package com.sg.service.biz.app.impl;

import cn.hutool.core.collection.CollectionUtil;
import com.sg.common.util.CommonFunctionHelper;
import com.sg.common.util.RedisUtil;
import com.sg.dto.biz.app.req.*;
import com.sg.dto.biz.app.res.*;
import com.sg.dto.integration.app.QueryConfItemMatchAnswerDetailComReqDto;
import com.sg.dto.integration.app.RefreshSchemeOpenRecordAuthUseTypeComReqDto;
import com.sg.dto.integration.app.RefreshSchemeOpenRecordAuthUseTypeComRespDto;
import com.sg.dto.integration.calc.CalculateCalcServiceCollectionComReqDto;
import com.sg.dto.integration.calc.CalculateCalcServiceCollectionComRespDto;
import com.sg.service.base.app.MOmsEvaluationObjectTargetCycleService;
import com.sg.service.base.app.MOmsEvaluationTemplateService;
import com.sg.service.base.app.MOmsExecuteProgressService;
import com.sg.service.base.app.MOmsTargetService;
import com.sg.service.biz.app.EvaSystemService;
import com.sg.service.biz.app.EvaThemeService;
import com.sg.common.exception.Assert;
import com.wicket.okrcalc.integration.FwCalcCalculationRulesClient;
import com.wicket.okrcomponent.integration.*;
import com.wicket.okrcomponent.integration.dto.*;
import com.wicket.okrframework.integration.BaseService;
import com.wicket.okrframework.integration.OrgService;
import com.wicket.okrframework.integration.PowerService;
import com.wicket.okrframework.integration.dto.*;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
//import com.wicket.okrapp.biz.service.dto.common.CountNumberDataSetsDto;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Service
public class SecurityServiceImpl
        implements com.wicket.okrapp.biz.service.SecurityService {

    @Resource
    private RedisUtil redisUtil;
    @Resource
    private InterfaceModeService interfaceModeService;
    @Resource
    private FwCalcCalculationRulesClient fwCalcCalculationRulesClient;
    @Resource
    private BaseService baseService;
    @Resource
    private EvaThemeService evaThemeService;
    @Resource
    private EvaSystemService evaSystemService;
    @Resource
    private OrgService orgService;
    //@Resource
    //private MCustomFields2Service mCustomFields2Service;
    @Resource
    private NbSecurity nbSecurity;
    @Resource
    private ConfSchemeService confSchemeService;
    @Resource
    private SchemeOpenRecordService fwCompSchemeOpenRecordClient;
    @Resource
    private DivineDataService fwCompDivineDataClient;
    @Resource
    private MOmsEvaluationObjectTargetCycleService mOmsEvaluationObjectTargetCycleService;
    @Resource
    private MOmsTargetService mOmsTargetService;
    @Resource
    private FwCompSecurityClient fwCompSecurityClient;
    @Resource
    private PowerService powerService;
    @Resource
    private MOmsEvaluationTemplateService mOmsEvaluationTemplateService;
    @Resource
    private MOmsExecuteProgressService mOmsExecuteProgressService;
//@Resource
// private MOmsSchemeOpenRecordService mOmsSchemeOpenRecordService;

    /**
     * D3执行同时编辑的授权对象数校验(公共)[5719]
     * gen by moon at 1/21/2023, 12:05:12 PM
     */
    @Trace(operationName = "D3执行同时编辑的授权对象数校验(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public ImplementSimultaneouslyCanEditObjNumValidityComRespDto implementSimultaneouslyCanEditObjNumValidityCom(ImplementSimultaneouslyCanEditObjNumValidityComReqDto reqDto) {


        //virtualUsage D2查询正在编辑的方案授权对象列表(公共)  27398
        QueryAuthorizationObjectListComRespDto queryAuthorizationObjectListComRespDto = null;
        QueryAuthorizationObjectListComReqDto queryAuthorizationObjectListComReqDto = new QueryAuthorizationObjectListComReqDto();
        queryAuthorizationObjectListComReqDto.setSubjectLifeCycle("EDITING");//sourceId:613344_1_27398
        if (reqDto != null) {
            queryAuthorizationObjectListComReqDto.setApplexType(reqDto.getApplexType());//SimpleFieldAssign//sourceId:613343_1_27398
            queryAuthorizationObjectListComReqDto.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:613346_1_27398
        }

        /*D2查询正在编辑的方案授权对象列表(公共)[5716]   */
        Assert.isNull(queryAuthorizationObjectListComReqDto.getApplexType(), "D3执行同时编辑的授权对象数校验(公共)-D2查询正在编辑的方案授权对象列表(公共)-应用实例类型不能为空", false);
        Assert.isNull(queryAuthorizationObjectListComReqDto.getSubjectLifeCycle(), "D3执行同时编辑的授权对象数校验(公共)-D2查询正在编辑的方案授权对象列表(公共)-主体生命周期不能为空", false);
        queryAuthorizationObjectListComRespDto = queryAuthorizationObjectListCom(queryAuthorizationObjectListComReqDto);


        if ((queryAuthorizationObjectListComRespDto != null && queryAuthorizationObjectListComRespDto.getCommPrimaryKeyList() != null && queryAuthorizationObjectListComRespDto.getCommPrimaryKeyList().size() > 1)) {
            //if(D2查询正在编辑的方案授权对象列表(公共).通用主键列表数据集条数 大于 1)  27399

            ImplementCountNumberDataSetsComRespDto implementCountNumberDataSetsComRespDto = null;
            if (queryAuthorizationObjectListComRespDto != null) {
                ImplementCountNumberDataSetsComReqDto implementCountNumberDataSetsComReqDto = new ImplementCountNumberDataSetsComReqDto();
                //todo dong 未找到匹配生成策略,请检查生成策略implementCountNumberDataSetsComReqDto.setCountNumberDataSetsList(queryAuthorizationObjectListComRespDto.getCommPrimaryKeyList()),数据源项; to( ==>tableName:undefined, fieldEnname:countNumberDataSetsList ,uniqueId: 613439_1_27402 uniqueSourceId:613345_1_27398) from (varName:undefined fieldqueryAuthorizationObjectListComRespDto.getCommPrimaryKeyList())

                /*D2-执行统计数据集条数服务(公共)[5166]   */

                implementCountNumberDataSetsComRespDto = interfaceModeService.implementCountNumberDataSetsCom(implementCountNumberDataSetsComReqDto).getData();


            }
            CalculateCalcServiceCollectionComRespDto calculateCalcServiceCollectionComRespDto = null;
            if (implementCountNumberDataSetsComRespDto != null) {
                CalculateCalcServiceCollectionComReqDto calculateCalcServiceCollectionComReqDto = new CalculateCalcServiceCollectionComReqDto();
                calculateCalcServiceCollectionComReqDto.setCalcFormula("SUBTRACTION_OF_TWO_NUM");//sourceId:613429_1_27401
                if (implementCountNumberDataSetsComRespDto != null) {
                    calculateCalcServiceCollectionComReqDto.setCalcPara1(implementCountNumberDataSetsComRespDto.getOutputNum() != null ? Double.valueOf(implementCountNumberDataSetsComRespDto.getOutputNum()) : null);//SimpleFieldAssign//sourceId:613431_1_27401
                }
                if (reqDto != null) {
                    calculateCalcServiceCollectionComReqDto.setCalcPara2(reqDto.getSimultaneouslyCanEditObjNum() != null ? Double.valueOf(reqDto.getSimultaneouslyCanEditObjNum()) : null);//SimpleFieldAssign//sourceId:613432_1_27401
                }

                /*D4-计算服务集合(公共)[5091]   */
                Assert.isNull(calculateCalcServiceCollectionComReqDto.getCalcFormula(), "D3执行同时编辑的授权对象数校验(公共)-D4-计算服务集合(公共)-通用计算公式不能为空", false);
                Assert.isNull(calculateCalcServiceCollectionComReqDto.getCalcPara1(), "D3执行同时编辑的授权对象数校验(公共)-D4-计算服务集合(公共)-计算入参1不能为空", false);
                Assert.isNull(calculateCalcServiceCollectionComReqDto.getCalcPara2(), "D3执行同时编辑的授权对象数校验(公共)-D4-计算服务集合(公共)-计算入参2不能为空", false);
                calculateCalcServiceCollectionComRespDto = fwCalcCalculationRulesClient.calculateCalcServiceCollectionCom(calculateCalcServiceCollectionComReqDto).getData();


            }
            if ((calculateCalcServiceCollectionComRespDto != null && calculateCalcServiceCollectionComRespDto.getCalcResult() > 0)) {
                //if(D4-计算服务集合(公共).计算结果 大于 0)  27403

                UpdateSpaceComRespDto updateSpaceComRespDto = null;
                UpdateSpaceComReqDto updateSpaceComReqDto = new UpdateSpaceComReqDto();
                updateSpaceComReqDto.setCreateTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME//sourceId:613428_1_27404
                if (reqDto != null) {
                    updateSpaceComReqDto.setSpaceId(reqDto.getTenantSpaceId());//SimpleFieldAssign//sourceId:613427_1_27404
                }

                /*D1修改空间创建时间(公共)[5720]   */
                Assert.isNull(updateSpaceComReqDto.getSpaceId(), "D3执行同时编辑的授权对象数校验(公共)-D1修改空间创建时间(公共)-空间ID不能为空", false);
                Assert.isNull(updateSpaceComReqDto.getCreateTime(), "D3执行同时编辑的授权对象数校验(公共)-D1修改空间创建时间(公共)-创建时间不能为空", false);
                updateSpaceComRespDto = baseService.updateSpaceCom(updateSpaceComReqDto).getData();


            }
        }
        ImplementSimultaneouslyCanEditObjNumValidityComRespDto retData = new ImplementSimultaneouslyCanEditObjNumValidityComRespDto();


        return retData;
    }

    /**
     * D3查询授权对象列表(公共)[5716]
     * gen by moon at 1/27/2023, 8:30:27 PM
     */
    @Trace(operationName = "D3查询授权对象列表(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryAuthorizationObjectListComRespDto queryAuthorizationObjectListCom(QueryAuthorizationObjectListComReqDto reqDto) {


        QueryEvaThemeListComRespDto queryEvaThemeListComRespDto_1 = null;
        QueryEvaluationTemplateListComRespDto queryEvaluationTemplateListComRespDto_1 = null;
        QueryOrgListComRespDto queryOrgListComRespDto_1 = null;
        if ((reqDto != null && reqDto.getApplexType() != null && reqDto.getApplexType().equals("EVA_THEME"))) {
            //if(D2查询方案授权对象列表(公共).应用实例类型 等于 评价主题)  27382

            QueryEvaThemeListComRespDto queryEvaThemeListComRespDto = null;
            QueryEvaThemeListComReqDto queryEvaThemeListComReqDto = new QueryEvaThemeListComReqDto();
            if (reqDto != null) {
                queryEvaThemeListComReqDto.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:614003_1_27383
                queryEvaThemeListComReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:613117_1_27383
            }

            /*D3查询评价主题列表(公共)[5717]   */
            Assert.isNull(queryEvaThemeListComReqDto.getConfSchemeId(), "D3查询授权对象列表(公共)-D3查询评价主题列表(公共)-冗余配置方案ID 不能为空", false);
            Assert.isNull(queryEvaThemeListComReqDto.getSubjectLifeCycle(), "D3查询授权对象列表(公共)-D3查询评价主题列表(公共)-主体生命周期不能为空", false);
            queryEvaThemeListComRespDto = evaThemeService.queryEvaThemeListCom(queryEvaThemeListComReqDto);


            queryEvaThemeListComRespDto_1 = queryEvaThemeListComRespDto;
        } else if ((reqDto != null && reqDto.getApplexType() != null && reqDto.getApplexType().equals("EVA_TEMP"))) {
            //elseif(D2查询方案授权对象列表(公共).应用实例类型 等于 评价模板)  27384

            QueryEvaluationTemplateListComRespDto queryEvaluationTemplateListComRespDto = null;
            QueryEvaluationTemplateListComReqDto queryEvaluationTemplateListComReqDto = new QueryEvaluationTemplateListComReqDto();
            if (reqDto != null) {
                queryEvaluationTemplateListComReqDto.setConfSchemeCode(reqDto.getConfSchemeCode());//SimpleFieldAssign//sourceId:613096_1_27385
                queryEvaluationTemplateListComReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:613097_1_27385
            }

            /*D3-查询评价模板列表(公共)[5466]   */
            Assert.isNull(queryEvaluationTemplateListComReqDto.getConfSchemeCode(), "D3查询授权对象列表(公共)-D3-查询评价模板列表(公共)-冗余配置方案标识不能为空", false);
            Assert.isNull(queryEvaluationTemplateListComReqDto.getSubjectLifeCycle(), "D3查询授权对象列表(公共)-D3-查询评价模板列表(公共)-主体生命周期不能为空", false);
            queryEvaluationTemplateListComRespDto = evaSystemService.queryEvaluationTemplateListCom(queryEvaluationTemplateListComReqDto);


            queryEvaluationTemplateListComRespDto_1 = queryEvaluationTemplateListComRespDto;
        } else if ((reqDto != null && reqDto.getApplexType() != null && reqDto.getApplexType().equals("ORG"))) {
            //elseif(D2查询方案授权对象列表(公共).应用实例类型 等于 组织)  27386

            QueryOrgListComRespDto queryOrgListComRespDto = null;
            QueryOrgListComReqDto queryOrgListComReqDto = new QueryOrgListComReqDto();
            if (reqDto != null) {
                queryOrgListComReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:613124_1_27387
            }

            /*D1查询组织列表(公共)[5718]   */
            Assert.isNull(queryOrgListComReqDto.getSubjectLifeCycle(), "D3查询授权对象列表(公共)-D1查询组织列表(公共)-主体生命周期不能为空", false);
            queryOrgListComRespDto = orgService.queryOrgListCom(queryOrgListComReqDto).getData();


            queryOrgListComRespDto_1 = queryOrgListComRespDto;
        }
        QueryAuthorizationObjectListComRespDto retData = new QueryAuthorizationObjectListComRespDto();
        if (queryEvaThemeListComRespDto_1 != null) {
            retData.setCommPrimaryKeyList(queryEvaThemeListComRespDto_1.getEvalThemeList());//list-field-assign//sourceId:613196_1
        }
        if (queryEvaluationTemplateListComRespDto_1 != null) {
            retData.setCommPrimaryKeyList(queryEvaluationTemplateListComRespDto_1.getEvalTempList());//list-field-assign//sourceId:613196_1
        }
        if (queryOrgListComRespDto_1 != null) {
            retData.setCommPrimaryKeyList(queryOrgListComRespDto_1.getOrgList());//list-field-assign//sourceId:613196_1
        }


        return retData;
    }

    /**
     * D3执行对象授权鉴定(公共)[5714]
     * gen by moon at 1/22/2023, 7:14:39 PM
     */
    @Trace(operationName = "D3执行对象授权鉴定(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public ImplementObjectAuthorizationAuthenticateComRespDto implementObjectAuthorizationAuthenticateCom(ImplementObjectAuthorizationAuthenticateComReqDto reqDto) {


        if ((reqDto != null && reqDto.getAuthType() != null && reqDto.getAuthType().equals("CYCLE_TIME") || reqDto != null && reqDto.getAuthType() != null && reqDto.getAuthType().equals("FIXED_TIME"))) {
            //if((D2执行开通方案有效性鉴权(公共).授权类型 等于 周期时间型 or D2执行开通方案有效性鉴权(公共).授权类型 等于 固定时间型))  27367

            QueryAuthorizationObjectListComRespDto queryAuthorizationObjectListComRespDto = null;
            QueryAuthorizationObjectListComReqDto queryAuthorizationObjectListComReqDto = new QueryAuthorizationObjectListComReqDto();
            queryAuthorizationObjectListComReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:613200_1_27381
            if (reqDto != null) {
                queryAuthorizationObjectListComReqDto.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:613254_1_27381
                queryAuthorizationObjectListComReqDto.setConfSchemeCode(reqDto.getConfSchemeCode());//SimpleFieldAssign//sourceId:614000_1_27381
                queryAuthorizationObjectListComReqDto.setApplexType(reqDto.getApplexType());//SimpleFieldAssign//sourceId:613198_1_27381
            }

            /*D3查询授权对象列表(公共)[5716]   */
            Assert.isNull(queryAuthorizationObjectListComReqDto.getApplexType(), "D3执行对象授权鉴定(公共)-D3查询授权对象列表(公共)-应用实例类型不能为空", false);
            Assert.isNull(queryAuthorizationObjectListComReqDto.getSubjectLifeCycle(), "D3执行对象授权鉴定(公共)-D3查询授权对象列表(公共)-主体生命周期不能为空", false);
            queryAuthorizationObjectListComRespDto = queryAuthorizationObjectListCom(queryAuthorizationObjectListComReqDto);


            if ((queryAuthorizationObjectListComRespDto != null && queryAuthorizationObjectListComRespDto.getCommPrimaryKeyList() != null && queryAuthorizationObjectListComRespDto.getCommPrimaryKeyList().size() > 0)) {
                //if(D2查询方案授权对象列表(公共).通用主键列表数据集条数 大于 0)  27390

                ImplementCountNumberDataSetsComRespDto implementCountNumberDataSetsComRespDto = null;
                if (queryAuthorizationObjectListComRespDto != null) {
                    ImplementCountNumberDataSetsComReqDto implementCountNumberDataSetsComReqDto = new ImplementCountNumberDataSetsComReqDto();
                    //todo dong 未找到匹配生成策略,请检查生成策略implementCountNumberDataSetsComReqDto.setCountNumberDataSetsList(queryAuthorizationObjectListComRespDto.getCommPrimaryKeyList()),数据源项; to( ==>tableName:undefined, fieldEnname:countNumberDataSetsList ,uniqueId: 613201_1_27391 uniqueSourceId:613197_1_27381) from (varName:undefined fieldqueryAuthorizationObjectListComRespDto.getCommPrimaryKeyList())

                    /*D2-执行统计数据集条数服务(公共)[5166]   */

                    implementCountNumberDataSetsComRespDto = interfaceModeService.implementCountNumberDataSetsCom(implementCountNumberDataSetsComReqDto).getData();


                }
                CalculateCalcServiceCollectionComRespDto calculateCalcServiceCollectionComRespDto = null;
                if (implementCountNumberDataSetsComRespDto != null) {
                    CalculateCalcServiceCollectionComReqDto calculateCalcServiceCollectionComReqDto = new CalculateCalcServiceCollectionComReqDto();
                    calculateCalcServiceCollectionComReqDto.setCalcFormula("SUBTRACTION_OF_TWO_NUM");//sourceId:613256_1_27392
                    if (reqDto != null) {
                        calculateCalcServiceCollectionComReqDto.setCalcPara1(reqDto.getAuthorizationNum() != null ? Double.valueOf(reqDto.getAuthorizationNum()) : null);//SimpleFieldAssign//sourceId:613258_1_27392
                    }
                    if (implementCountNumberDataSetsComRespDto != null) {
                        calculateCalcServiceCollectionComReqDto.setCalcPara2(implementCountNumberDataSetsComRespDto.getOutputNum() != null ? Double.valueOf(implementCountNumberDataSetsComRespDto.getOutputNum()) : null);//SimpleFieldAssign//sourceId:613259_1_27392
                    }

                    /*D4-计算服务集合(公共)[5091]   */
                    Assert.isNull(calculateCalcServiceCollectionComReqDto.getCalcFormula(), "D3执行对象授权鉴定(公共)-D4-计算服务集合(公共)-通用计算公式不能为空", false);
                    Assert.isNull(calculateCalcServiceCollectionComReqDto.getCalcPara1(), "D3执行对象授权鉴定(公共)-D4-计算服务集合(公共)-计算入参1不能为空", false);
                    Assert.isNull(calculateCalcServiceCollectionComReqDto.getCalcPara2(), "D3执行对象授权鉴定(公共)-D4-计算服务集合(公共)-计算入参2不能为空", false);
                    calculateCalcServiceCollectionComRespDto = fwCalcCalculationRulesClient.calculateCalcServiceCollectionCom(calculateCalcServiceCollectionComReqDto).getData();


                }
                if ((calculateCalcServiceCollectionComRespDto != null && calculateCalcServiceCollectionComRespDto.getCalcResult() > 0)) {
                    //if(D4-计算服务集合(公共).计算结果 大于 0)  27393

//ModelCode: receptionService
                    ObtainReceiveFieldsRespDto receptionServiceRes = null;
                    ObtainReceiveFieldsReqDto receptionServiceReq = new ObtainReceiveFieldsReqDto();
                    receptionServiceReq.setOutputNum(Long.valueOf(1));//CUSTOM_CONVENTION//sourceId:612832_1_27394

                    /*M2-约定允许操作[4007]  用于特殊方法接收上游入参。 */
                    Assert.isNull(receptionServiceReq.getOutputNum(), "D3执行对象授权鉴定(公共)-M2-约定允许操作-传输数值（整数型）不能为空", false);
                    receptionServiceRes = nbSecurity.obtainReceiveFields(receptionServiceReq);


                } else if ((calculateCalcServiceCollectionComRespDto != null && calculateCalcServiceCollectionComRespDto.getCalcResult() == 0)) {
                    //elseif(D4-计算服务集合(公共).计算结果 等于 0)  27395

                    QueryConfItemMatchAnswerDetailComRespDto queryConfItemMatchAnswerDetailComRespDto = null;
                    QueryConfItemMatchAnswerDetailComReqDto queryConfItemMatchAnswerDetailComReqDto = new QueryConfItemMatchAnswerDetailComReqDto();
                    queryConfItemMatchAnswerDetailComReqDto.setConfSchemeCode("COM_CONF_SCHEME");//CUSTOM_CONVENTION//sourceId:613269_1_27397
                    queryConfItemMatchAnswerDetailComReqDto.setConfItemCode("IMPOWER_QUANTITY_LACK_UNUSABLE");//CUSTOM_CONVENTION//sourceId:613266_1_27397
                    queryConfItemMatchAnswerDetailComReqDto.setIsPlatData("TRUE");//sourceId:613275_1_27397

                    /*D2-3查授权数量不足不可用文案[2486]   */
                    Assert.isNull(queryConfItemMatchAnswerDetailComReqDto.getConfSchemeCode(), "D3执行对象授权鉴定(公共)-D2-3查授权数量不足不可用文案-配置方案标识不能为空", false);
                    Assert.isNull(queryConfItemMatchAnswerDetailComReqDto.getConfItemCode(), "D3执行对象授权鉴定(公共)-D2-3查授权数量不足不可用文案-配置项标识不能为空", false);
                    Assert.isNull(queryConfItemMatchAnswerDetailComReqDto.getIsPlatData(), "D3执行对象授权鉴定(公共)-D2-3查授权数量不足不可用文案-是否标准答案不能为空", false);
                    // queryConfItemMatchAnswerDetailComRespDto = confSchemeService.queryConfItemMatchAnswerDetailCom(com.wicket.okrcomponent.integration.dto.QueryConfItemMatchAnswerDetailComReqDto).getData();


                    RefreshSchemeOpenRecordAuthUseTypeComRespDto refreshSchemeOpenRecordAuthUseTypeComRespDto = null;
                    RefreshSchemeOpenRecordAuthUseTypeComReqDto refreshSchemeOpenRecordAuthUseTypeComReqDto = new RefreshSchemeOpenRecordAuthUseTypeComReqDto();
                    if (reqDto != null) {
                        refreshSchemeOpenRecordAuthUseTypeComReqDto.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:613006_1_27396
                        refreshSchemeOpenRecordAuthUseTypeComReqDto.setTenantSpaceId(reqDto.getTenantSpaceId());//SimpleFieldAssign//sourceId:613007_1_27396
                    }

                    /*D2更新方案开通记录授权使用类型状态(公共)[5715]   */
                    Assert.isNull(refreshSchemeOpenRecordAuthUseTypeComReqDto.getConfSchemeId(), "D3执行对象授权鉴定(公共)-D2更新方案开通记录授权使用类型状态(公共)-配置方案ID 不能为空", false);
                    Assert.isNull(refreshSchemeOpenRecordAuthUseTypeComReqDto.getTenantSpaceId(), "D3执行对象授权鉴定(公共)-D2更新方案开通记录授权使用类型状态(公共)-租户空间ID不能为空", false);
                    //refreshSchemeOpenRecordAuthUseTypeComRespDto = fwCompSchemeOpenRecordClient.refreshSchemeOpenRecordAuthUseTypeCom(refreshSchemeOpenRecordAuthUseTypeComReqDto).getData();


                }
            }
        } else if ((reqDto != null && reqDto.getAuthType() != null && reqDto.getAuthType().equals("QUANTITY"))) {
            //elseif(D2执行开通方案有效性鉴权(公共).授权类型 等于 数量型)  27368

            CheckTimeScopeSearchComRespDto checkTimeScopeSearchComRespDto = null;
            CheckTimeScopeSearchComReqDto checkTimeScopeSearchComReqDto = new CheckTimeScopeSearchComReqDto();
            checkTimeScopeSearchComReqDto.setCurrentTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME//sourceId:612765_1_27369
            if (reqDto != null) {
                checkTimeScopeSearchComReqDto.setCompareTime(reqDto.getImpowerEndTime());//SimpleFieldAssign//sourceId:612767_1_27369
            }

            /*D2检查时间范围查询(公共)[3297]   */
            Assert.isNull(checkTimeScopeSearchComReqDto.getCurrentTime(), "D3执行对象授权鉴定(公共)-D2检查时间范围查询(公共)-当前时间不能为空", false);
            Assert.isNull(checkTimeScopeSearchComReqDto.getCompareTime(), "D3执行对象授权鉴定(公共)-D2检查时间范围查询(公共)-比较时间不能为空", false);
            checkTimeScopeSearchComRespDto = fwCompDivineDataClient.checkTimeScopeSearchCom(checkTimeScopeSearchComReqDto).getData();


            if ((checkTimeScopeSearchComRespDto != null && checkTimeScopeSearchComRespDto.getTimeCompareResult() != null && checkTimeScopeSearchComRespDto.getTimeCompareResult().equals("BEFORE") && checkTimeScopeSearchComRespDto != null && checkTimeScopeSearchComRespDto.getTimeCompareResult() != null && checkTimeScopeSearchComRespDto.getTimeCompareResult().equals("PRESENT"))) {
                //if((D2检查时间范围查询(公共).时间比较结果 等于 之前（小于） and D2检查时间范围查询(公共).时间比较结果 等于 当前（等于）))  27370

//ModelCode: receptionService
                ObtainReceiveFieldsRespDto receptionServiceRes_2 = null;
                ObtainReceiveFieldsReqDto receptionServiceReq_1 = new ObtainReceiveFieldsReqDto();
                receptionServiceReq_1.setOutputNum(Long.valueOf(1));//CUSTOM_CONVENTION//sourceId:612832_1_27371

                /*M2-约定允许操作[4007]  用于特殊方法接收上游入参。 */
                Assert.isNull(receptionServiceReq_1.getOutputNum(), "D3执行对象授权鉴定(公共)-M2-约定允许操作-传输数值（整数型）不能为空", false);
                receptionServiceRes_2 = nbSecurity.obtainReceiveFields(receptionServiceReq_1);


            } else if ((checkTimeScopeSearchComRespDto != null && checkTimeScopeSearchComRespDto.getTimeCompareResult() != null && checkTimeScopeSearchComRespDto.getTimeCompareResult().equals("LATER"))) {
                //elseif(D2检查时间范围查询(公共).时间比较结果 等于 之后（大于）)  27372

                QueryConfItemMatchAnswerDetailComRespDto queryConfItemMatchAnswerDetailComRespDto_2 = null;
                QueryConfItemMatchAnswerDetailComReqDto queryConfItemMatchAnswerDetailComReqDto_1 = new QueryConfItemMatchAnswerDetailComReqDto();
                queryConfItemMatchAnswerDetailComReqDto_1.setConfSchemeCode("COM_CONF_SCHEME");//CUSTOM_CONVENTION//sourceId:612837_1_27373
                queryConfItemMatchAnswerDetailComReqDto_1.setConfItemCode("IMPOWER_EXPIRE_UNUSABLE");//CUSTOM_CONVENTION//sourceId:612834_1_27373
                queryConfItemMatchAnswerDetailComReqDto_1.setIsPlatData("TRUE");//sourceId:612843_1_27373

                /*D2-3查授权到期不可用文案[2486]   */
                Assert.isNull(queryConfItemMatchAnswerDetailComReqDto_1.getConfSchemeCode(), "D3执行对象授权鉴定(公共)-D2-3查授权到期不可用文案-配置方案标识不能为空", false);
                Assert.isNull(queryConfItemMatchAnswerDetailComReqDto_1.getConfItemCode(), "D3执行对象授权鉴定(公共)-D2-3查授权到期不可用文案-配置项标识不能为空", false);
                Assert.isNull(queryConfItemMatchAnswerDetailComReqDto_1.getIsPlatData(), "D3执行对象授权鉴定(公共)-D2-3查授权到期不可用文案-是否标准答案不能为空", false);
                //queryConfItemMatchAnswerDetailComRespDto_2 = confSchemeService.queryConfItemMatchAnswerDetailCom(queryConfItemMatchAnswerDetailComReqDto_1).getData();


                RefreshSchemeOpenRecordAuthUseTypeComRespDto refreshSchemeOpenRecordAuthUseTypeComRespDto_1 = null;
                RefreshSchemeOpenRecordAuthUseTypeComReqDto refreshSchemeOpenRecordAuthUseTypeComReqDto_1 = new RefreshSchemeOpenRecordAuthUseTypeComReqDto();
                if (reqDto != null) {
                    refreshSchemeOpenRecordAuthUseTypeComReqDto_1.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:613006_1_27374
                    refreshSchemeOpenRecordAuthUseTypeComReqDto_1.setTenantSpaceId(reqDto.getTenantSpaceId());//SimpleFieldAssign//sourceId:613007_1_27374
                }

                /*D2更新方案开通记录授权使用类型状态(公共)[5715]   */
                Assert.isNull(refreshSchemeOpenRecordAuthUseTypeComReqDto_1.getConfSchemeId(), "D3执行对象授权鉴定(公共)-D2更新方案开通记录授权使用类型状态(公共)-配置方案ID 不能为空", false);
                Assert.isNull(refreshSchemeOpenRecordAuthUseTypeComReqDto_1.getTenantSpaceId(), "D3执行对象授权鉴定(公共)-D2更新方案开通记录授权使用类型状态(公共)-租户空间ID不能为空", false);
                // refreshSchemeOpenRecordAuthUseTypeComRespDto_1 = fwCompSchemeOpenRecordClient.refreshSchemeOpenRecordAuthUseTypeCom(refreshSchemeOpenRecordAuthUseTypeComReqDto_1).getData();


            }
        }
        ImplementObjectAuthorizationAuthenticateComRespDto retData = new ImplementObjectAuthorizationAuthenticateComRespDto();


        return retData;
    }

    /**
     * D3执行获取安全参数(公共)[5845]
     * gen by moon at 2/6/2023, 12:30:30 AM
     */
    @Trace(operationName = "D3执行获取安全参数(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public ImplementObtainSafetyArgumentsComRespDto implementObtainSafetyArgumentsCom(ImplementObtainSafetyArgumentsComReqDto reqDto) {


        ImplementObtainSafetyArgumentsRespDto obtainSafetyArgumentsRes_1 = null;
//步骤0: M3执行获取安全参数（特殊方法） - implementObtainSafetyArguments
        //ModelCode: obtainSafetyArguments
        ImplementObtainSafetyArgumentsRespDto obtainSafetyArgumentsRes = null;
        ImplementObtainSafetyArgumentsReqDto obtainSafetyArgumentsReq = new ImplementObtainSafetyArgumentsReqDto();
        if (reqDto != null) {
            obtainSafetyArgumentsReq.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:651350_1
        }

        /*M3执行获取安全参数（特殊方法）[5844]  获取C++固化的安全参数 */
        Assert.isNull(obtainSafetyArgumentsReq.getConfSchemeId(), "D3执行获取安全参数(公共)-M3执行获取安全参数（特殊方法）-配置方案ID 不能为空", false);
        obtainSafetyArgumentsRes = nbSecurity.implementObtainSafetyArguments(obtainSafetyArgumentsReq);


        obtainSafetyArgumentsRes_1 = obtainSafetyArgumentsRes;

        ImplementObtainSafetyArgumentsComRespDto retData = new ImplementObtainSafetyArgumentsComRespDto();
        if (obtainSafetyArgumentsRes_1 != null) {
            retData.setConfSchemeId(obtainSafetyArgumentsRes_1.getConfSchemeId());//SimpleFieldAssign//sourceId:651361_1
            retData.setConfSchemeCode(obtainSafetyArgumentsRes_1.getConfSchemeCode());//SimpleFieldAssign//sourceId:651362_1
            retData.setApplexType(obtainSafetyArgumentsRes_1.getApplexType());//SimpleFieldAssign//sourceId:651363_1
            retData.setAuthType(obtainSafetyArgumentsRes_1.getAuthType());//SimpleFieldAssign//sourceId:651364_1
            retData.setRemainingQty(obtainSafetyArgumentsRes_1.getRemainingQty());//SimpleFieldAssign//sourceId:651365_1
            retData.setStartTime(obtainSafetyArgumentsRes_1.getStartTime());//SimpleFieldAssign//sourceId:651366_1
            retData.setEndTime(obtainSafetyArgumentsRes_1.getEndTime());//SimpleFieldAssign//sourceId:651367_1
            retData.setTenantSpaceId(obtainSafetyArgumentsRes_1.getTenantSpaceId());//SimpleFieldAssign//sourceId:651368_1
            retData.setSimultaneouslyCanEditObjNum(obtainSafetyArgumentsRes_1.getComNumField());//SimpleFieldAssign//sourceId:651369_1
        }


        return retData;
    }

    /**
     * D3判断租户规划证书及异常(公共)[6535]
     * gen by moon at 7/16/2023, 11:38:31 PM
     */
    @Trace(operationName = "D3判断租户规划证书及异常(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public JudgeDetermineTenantCertificateAvailabilityAbnormalComRespDto judgeDetermineTenantCertificateAvailabilityAbnormalCom(JudgeDetermineTenantCertificateAvailabilityAbnormalComReqDto reqDto) {


        ImplementAcceptFieldRespDto receptionServiceRes_3 = null;
//virtualUsage D2获取私有化或saas参数分析(公共)  40712
        ObtainSecurityParamAvailableComRespDto obtainSecurityParamAvailableComRespDto = null;
        ObtainSecurityParamAvailableComReqDto obtainSecurityParamAvailableComReqDto = new ObtainSecurityParamAvailableComReqDto();
        obtainSecurityParamAvailableComReqDto.setTenantSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:927504_1_40712
        if (reqDto != null) {
            obtainSecurityParamAvailableComReqDto.setAuthorizationKeyTypeCode(reqDto.getAuthorizationKeyTypeCode());//SimpleFieldAssign//sourceId:932178_1_40712
        }

        /*D2获取私有化或saas参数分析(公共)[6533]   */
        Assert.isNull(obtainSecurityParamAvailableComReqDto.getAuthorizationKeyTypeCode(), "D3判断租户规划证书及异常(公共)-D2获取私有化或saas参数分析(公共)-开通钥匙类型标识不能为空", false);
        obtainSecurityParamAvailableComRespDto = fwCompSecurityClient.obtainSecurityParamAvailableCom(obtainSecurityParamAvailableComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


//virtualUsage M3约定钥匙操作类型为“操作异常”  40691
        //ModelCode: receptionService
        ImplementAcceptFieldRespDto receptionServiceRes = null;
        ImplementAcceptFieldReqDto receptionServiceReq = new ImplementAcceptFieldReqDto();
        receptionServiceReq.setKeyOperateType("OPERATE_ABNORMAL");//sourceId:910925_1_40691

        /*M3约定钥匙操作类型为“操作异常”[6100]  用于特殊方法接收上游入参。 */
        Assert.isNull(receptionServiceReq.getKeyOperateType(), "D3判断租户规划证书及异常(公共)-M3约定钥匙操作类型为“操作异常”-钥匙操作类型不能为空", false);
        receptionServiceRes = nbSecurity.implementAcceptField(receptionServiceReq);


//virtualUsage 3-3-01查已经新增数据初始化未完成的目标  40680
        OmsTarget omsTarget = null;
        QueryTargetDetailReq queryTargetDetailReq = new QueryTargetDetailReq();
        queryTargetDetailReq.setBizSceneCode("STRATEGY_PLAN_SCENE");//CUSTOM_CONVENTION//sourceId:910462_1_40680
        queryTargetDetailReq.setEvaluationTemplateTypeCode("TARGET_PLAN");//CUSTOM_CONVENTION//sourceId:910464_1_40680
        queryTargetDetailReq.setDataInitStatus("FALSE");//sourceId:910455_1_40680
        queryTargetDetailReq.setSubjectLifeCycle("EDITING");//sourceId:910453_1_40680
        if (reqDto != null) {
            queryTargetDetailReq.setEvaluationSubjectTypeCode(reqDto.getAuthorizationKeyTypeCode());//SimpleFieldAssign//sourceId:910463_1_40680
        }

        /*3-3-01查已经新增数据初始化未完成的目标[2488]   */
        Assert.isNull(queryTargetDetailReq.getBizSceneCode(), "D3判断租户规划证书及异常(公共)-3-3-01查已经新增数据初始化未完成的目标-冗余业务场景标识配置项不能为空", false);
        Assert.isNull(queryTargetDetailReq.getEvaluationSubjectTypeCode(), "D3判断租户规划证书及异常(公共)-3-3-01查已经新增数据初始化未完成的目标-冗余评价主题类型配置项不能为空", false);
        Assert.isNull(queryTargetDetailReq.getEvaluationTemplateTypeCode(), "D3判断租户规划证书及异常(公共)-3-3-01查已经新增数据初始化未完成的目标-冗余评价模板类型配置项不能为空", false);
        Assert.isNull(queryTargetDetailReq.getDataInitStatus(), "D3判断租户规划证书及异常(公共)-3-3-01查已经新增数据初始化未完成的目标-数据初始化完成状态不能为空", false);
        Assert.isNull(queryTargetDetailReq.getSubjectLifeCycle(), "D3判断租户规划证书及异常(公共)-3-3-01查已经新增数据初始化未完成的目标-主体生命周期不能为空", false);
        omsTarget = mOmsTargetService.queryTargetDetail(queryTargetDetailReq)/*vcase invoke 本地 method 方法调用;*/;


//virtualUsage 3-15-01查执行进度详情  44724
        OmsExecuteProgress omsExecuteProgress = null;
        if (omsTarget != null) {
            QueryExecuteProgressDetailReq queryExecuteProgressDetailReq = new QueryExecuteProgressDetailReq();
            queryExecuteProgressDetailReq.setUseTypeCode("USE_CUSTOM_EXECUTE_CYCLE");//CUSTOM_CONVENTION//sourceId:1022515_1_44724
            if (omsTarget != null) {
                queryExecuteProgressDetailReq.setThemeContentId(omsTarget.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:1022516_1_44724
            }

            /*3-15-01查执行进度详情[6959]   */
            Assert.isNull(queryExecuteProgressDetailReq.getUseTypeCode(), "D3判断租户规划证书及异常(公共)-3-15-01查执行进度详情-用途类型编码不能为空", false);
            Assert.isNull(queryExecuteProgressDetailReq.getThemeContentId(), "D3判断租户规划证书及异常(公共)-3-15-01查执行进度详情-主题内容ID不能为空", false);
            omsExecuteProgress = mOmsExecuteProgressService.queryExecuteProgressDetail(queryExecuteProgressDetailReq)/*vcase invoke 本地 method 方法调用;*/;


        }
        if ((omsTarget != null) && (omsExecuteProgress == null || omsExecuteProgress != null && omsExecuteProgress.getAsyncExecuteState() != null && omsExecuteProgress.getAsyncExecuteState().equals("NOT_START") || omsExecuteProgress != null && omsExecuteProgress.getAsyncExecuteState() != null && omsExecuteProgress.getAsyncExecuteState().equals("COMPLETED"))) {
            //if(3-3-01查已经新增数据初始化未完成的目标.出参 值不等于空  and (3-15-01查目标自定义汇报执行进度.出参 值等于空  or 3-15-01查目标自定义汇报执行进度.异步执行状态 等于 未开始 or 3-15-01查目标自定义汇报执行进度.异步执行状态 等于 已完成))  40681

            QueryConfItemMatchAnswerDetailComRespDto queryConfItemMatchAnswerDetailComRespDto = null;
// TODO: 2023/5/12 包冲突,手动代码 
            com.wicket.okrcomponent.integration.dto.QueryConfItemMatchAnswerDetailComReqDto queryConfItemMatchAnswerDetailComReqDto = new com.wicket.okrcomponent.integration.dto.QueryConfItemMatchAnswerDetailComReqDto();
            queryConfItemMatchAnswerDetailComReqDto.setConfItemCode("ADD_EVA_TEMP_ABNORMAL_WORDS");//CUSTOM_CONVENTION//sourceId:910492_1_40687
            queryConfItemMatchAnswerDetailComReqDto.setConfSchemeCode("COM_CONF_SCHEME");//CUSTOM_CONVENTION//sourceId:910495_1_40687
            queryConfItemMatchAnswerDetailComReqDto.setIsPlatData("TRUE");//sourceId:910501_1_40687

            /*D2-3查新增评价模板异常文案[2486]   */
            Assert.isNull(queryConfItemMatchAnswerDetailComReqDto.getConfItemCode(), "D3判断租户规划证书及异常(公共)-D2-3查新增评价模板异常文案-配置项标识不能为空", false);
            Assert.isNull(queryConfItemMatchAnswerDetailComReqDto.getConfSchemeCode(), "D3判断租户规划证书及异常(公共)-D2-3查新增评价模板异常文案-配置方案标识不能为空", false);
            Assert.isNull(queryConfItemMatchAnswerDetailComReqDto.getIsPlatData(), "D3判断租户规划证书及异常(公共)-D2-3查新增评价模板异常文案-是否标准答案不能为空", false);
            queryConfItemMatchAnswerDetailComRespDto = confSchemeService.queryConfItemMatchAnswerDetailCom(queryConfItemMatchAnswerDetailComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


//ModelCode: receptionService
            ImplementAcceptFieldRespDto receptionServiceRes_2 = null;
            if (queryConfItemMatchAnswerDetailComRespDto != null) {
                ImplementAcceptFieldReqDto receptionServiceReq_1 = new ImplementAcceptFieldReqDto();
                if (receptionServiceRes != null) {
                    receptionServiceReq_1.setKeyOperateType(receptionServiceRes.getKeyOperateType());//SimpleFieldAssign//sourceId:910713_1_40688
                }
                if (queryConfItemMatchAnswerDetailComRespDto != null) {
                    receptionServiceReq_1.setServiceAbnormalWords(queryConfItemMatchAnswerDetailComRespDto.getEndValue());//SimpleFieldAssign//sourceId:910712_1_40688
                }

                /*M3-接收钥匙可用类型及授权异常文案[6100]  用于特殊方法接收上游入参。 */
                Assert.isNull(receptionServiceReq_1.getKeyOperateType(), "D3判断租户规划证书及异常(公共)-M3-接收钥匙可用类型及授权异常文案-钥匙操作类型不能为空", false);
                receptionServiceRes_2 = nbSecurity.implementAcceptField(receptionServiceReq_1);


                receptionServiceRes_3 = receptionServiceRes_2;
            }
        } else if ((omsTarget == null)) {
            //elseif(3-3-01查已经新增数据初始化未完成的目标.出参 值等于空 )  40682

            if ((obtainSecurityParamAvailableComRespDto != null && obtainSecurityParamAvailableComRespDto.getDeployTypeCode() != null && obtainSecurityParamAvailableComRespDto.getDeployTypeCode().equals("SAAS"))) {
                //if(D2获取私有化或saas参数分析(公共).部署类型编码 等于 SAAS部署)  40684

                JudgeArrangeEmpowerAvailableComRespDto judgeArrangeEmpowerAvailableComRespDto = null;
                if (obtainSecurityParamAvailableComRespDto != null) {
                    JudgeArrangeEmpowerAvailableComReqDto judgeArrangeEmpowerAvailableComReqDto = new JudgeArrangeEmpowerAvailableComReqDto();
                    if (obtainSecurityParamAvailableComRespDto != null) {
                        judgeArrangeEmpowerAvailableComReqDto.setAuthUseType(obtainSecurityParamAvailableComRespDto.getAuthUseType());//SimpleFieldAssign//sourceId:909775_1_40686
                    }

                    /*D2-3判断部署授权可用分析(公共)[6534]   */
                    Assert.isNull(judgeArrangeEmpowerAvailableComReqDto.getAuthUseType(), "D3判断租户规划证书及异常(公共)-D2-3判断部署授权可用分析(公共)-授权使用类型不能为空", false);
                    judgeArrangeEmpowerAvailableComRespDto = fwCompSecurityClient.judgeArrangeEmpowerAvailableCom(judgeArrangeEmpowerAvailableComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


                }
//ModelCode: receptionService
                ImplementAcceptFieldRespDto receptionServiceRes_4 = null;
                if (judgeArrangeEmpowerAvailableComRespDto != null) {
                    ImplementAcceptFieldReqDto receptionServiceReq_2 = new ImplementAcceptFieldReqDto();
                    if (judgeArrangeEmpowerAvailableComRespDto != null) {
                        receptionServiceReq_2.setKeyOperateType(judgeArrangeEmpowerAvailableComRespDto.getKeyOperateType());//SimpleFieldAssign//sourceId:910713_1_40689
                        receptionServiceReq_2.setServiceAbnormalWords(judgeArrangeEmpowerAvailableComRespDto.getServiceAbnormalWords());//SimpleFieldAssign//sourceId:910712_1_40689
                    }

                    /*M3-接收钥匙可用类型及授权异常文案[6100]  用于特殊方法接收上游入参。 */
                    Assert.isNull(receptionServiceReq_2.getKeyOperateType(), "D3判断租户规划证书及异常(公共)-M3-接收钥匙可用类型及授权异常文案-钥匙操作类型不能为空", false);
                    receptionServiceRes_4 = nbSecurity.implementAcceptField(receptionServiceReq_2);


                    receptionServiceRes_3 = receptionServiceRes_4;
                }
            } else if ((obtainSecurityParamAvailableComRespDto != null && obtainSecurityParamAvailableComRespDto.getDeployTypeCode() != null && obtainSecurityParamAvailableComRespDto.getDeployTypeCode().equals("LOCALITY"))) {
                //elseif(D2获取私有化或saas参数分析(公共).部署类型编码 等于 本地化部署)  40685

                ImplementPrivatizationArrangeEmpowerAvailableComRespDto implementPrivatizationArrangeEmpowerAvailableComRespDto = null;
                if (obtainSecurityParamAvailableComRespDto != null) {
                    ImplementPrivatizationArrangeEmpowerAvailableComReqDto implementPrivatizationArrangeEmpowerAvailableComReqDto = new ImplementPrivatizationArrangeEmpowerAvailableComReqDto();
                    implementPrivatizationArrangeEmpowerAvailableComReqDto.setAscriptionSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:979373_1_40740
                    if (obtainSecurityParamAvailableComRespDto != null) {
                        implementPrivatizationArrangeEmpowerAvailableComReqDto.setSchOpenRecordId(obtainSecurityParamAvailableComRespDto.getSchOpenRecordId());//SimpleFieldAssign//sourceId:913130_1_40740
                        implementPrivatizationArrangeEmpowerAvailableComReqDto.setAuthType(obtainSecurityParamAvailableComRespDto.getAuthType());//SimpleFieldAssign//sourceId:926555_1_40740
                        implementPrivatizationArrangeEmpowerAvailableComReqDto.setResultAspObjType(obtainSecurityParamAvailableComRespDto.getApplObjType());//SimpleFieldAssign//sourceId:1089207_1_40740
                        implementPrivatizationArrangeEmpowerAvailableComReqDto.setResultAspObjId(obtainSecurityParamAvailableComRespDto.getAuthorizationObjectId());//SimpleFieldAssign//sourceId:1089208_1_40740
                        implementPrivatizationArrangeEmpowerAvailableComReqDto.setRemainingQty(obtainSecurityParamAvailableComRespDto.getAuthorizationNum() != null ? Long.valueOf(obtainSecurityParamAvailableComRespDto.getAuthorizationNum()) : null);//SimpleFieldAssign//sourceId:913132_1_40740
                        implementPrivatizationArrangeEmpowerAvailableComReqDto.setEndTime(obtainSecurityParamAvailableComRespDto.getAuthorizationEndTime());//SimpleFieldAssign//sourceId:913133_1_40740
                    }

                    /*D3执行私有化部署可用分析(公共)[6539]   */
                    Assert.isNull(implementPrivatizationArrangeEmpowerAvailableComReqDto.getSchOpenRecordId(), "D3判断租户规划证书及异常(公共)-D3执行私有化部署可用分析(公共)-开通钥匙ID不能为空", false);
                    Assert.isNull(implementPrivatizationArrangeEmpowerAvailableComReqDto.getAuthType(), "D3判断租户规划证书及异常(公共)-D3执行私有化部署可用分析(公共)-授权类型不能为空", false);
                    Assert.isNull(implementPrivatizationArrangeEmpowerAvailableComReqDto.getResultAspObjType(), "D3判断租户规划证书及异常(公共)-D3执行私有化部署可用分析(公共)-开通对象类型编码不能为空", false);
                    Assert.isNull(implementPrivatizationArrangeEmpowerAvailableComReqDto.getAscriptionSpaceId(), "D3判断租户规划证书及异常(公共)-D3执行私有化部署可用分析(公共)-归属空间ID不能为空", false);
                    implementPrivatizationArrangeEmpowerAvailableComRespDto = implementPrivatizationArrangeEmpowerAvailableCom(implementPrivatizationArrangeEmpowerAvailableComReqDto)/*vcase invoke 同服务,同domain*/;


                }
                JudgeArrangeEmpowerAvailableComRespDto judgeArrangeEmpowerAvailableComRespDto_2 = null;
                if (implementPrivatizationArrangeEmpowerAvailableComRespDto != null) {
                    JudgeArrangeEmpowerAvailableComReqDto judgeArrangeEmpowerAvailableComReqDto_1 = new JudgeArrangeEmpowerAvailableComReqDto();
                    if (implementPrivatizationArrangeEmpowerAvailableComRespDto != null) {
                        judgeArrangeEmpowerAvailableComReqDto_1.setAuthUseType(implementPrivatizationArrangeEmpowerAvailableComRespDto.getAuthUseType());//SimpleFieldAssign//sourceId:909775_1_40743
                    }

                    /*D2-3判断部署授权可用分析(公共)[6534]   */
                    Assert.isNull(judgeArrangeEmpowerAvailableComReqDto_1.getAuthUseType(), "D3判断租户规划证书及异常(公共)-D2-3判断部署授权可用分析(公共)-授权使用类型不能为空", false);
                    judgeArrangeEmpowerAvailableComRespDto_2 = fwCompSecurityClient.judgeArrangeEmpowerAvailableCom(judgeArrangeEmpowerAvailableComReqDto_1).getData()/*vcase invoke 跨dubbo调用;*/;


                }
//ModelCode: receptionService
                ImplementAcceptFieldRespDto receptionServiceRes_5 = null;
                if (judgeArrangeEmpowerAvailableComRespDto_2 != null) {
                    ImplementAcceptFieldReqDto receptionServiceReq_3 = new ImplementAcceptFieldReqDto();
                    if (judgeArrangeEmpowerAvailableComRespDto_2 != null) {
                        receptionServiceReq_3.setKeyOperateType(judgeArrangeEmpowerAvailableComRespDto_2.getKeyOperateType());//SimpleFieldAssign//sourceId:910713_1_40690
                        receptionServiceReq_3.setServiceAbnormalWords(judgeArrangeEmpowerAvailableComRespDto_2.getServiceAbnormalWords());//SimpleFieldAssign//sourceId:910712_1_40690
                    }

                    /*M3-接收钥匙可用类型及授权异常文案[6100]  用于特殊方法接收上游入参。 */
                    Assert.isNull(receptionServiceReq_3.getKeyOperateType(), "D3判断租户规划证书及异常(公共)-M3-接收钥匙可用类型及授权异常文案-钥匙操作类型不能为空", false);
                    receptionServiceRes_5 = nbSecurity.implementAcceptField(receptionServiceReq_3);


                    receptionServiceRes_3 = receptionServiceRes_5;
                }
            }
        } else if ((omsTarget != null && omsExecuteProgress != null && omsExecuteProgress.getAsyncExecuteState() != null && omsExecuteProgress.getAsyncExecuteState().equals("IN_PROGRESS"))) {
            //elseif((3-3-01查已经新增数据初始化未完成的目标.出参 值不等于空  and 3-15-01查目标自定义汇报执行进度.异步执行状态 等于 进行中))  44725

//ModelCode: receptionService
            ImplementAcceptFieldRespDto receptionServiceRes_6 = null;
            ImplementAcceptFieldReqDto receptionServiceReq_4 = new ImplementAcceptFieldReqDto();
            receptionServiceReq_4.setKeyOperateType("OPERATE_WAIT");//sourceId:1022877_1_44733

            /*M3约定钥匙操作类型为“操作异常等待”[6100]  用于特殊方法接收上游入参。 */
            Assert.isNull(receptionServiceReq_4.getKeyOperateType(), "D3判断租户规划证书及异常(公共)-M3约定钥匙操作类型为“操作异常等待”-钥匙操作类型不能为空", false);
            receptionServiceRes_6 = nbSecurity.implementAcceptField(receptionServiceReq_4);


            QueryConfItemMatchAnswerDetailComRespDto queryConfItemMatchAnswerDetailComRespDto_2 = null;
            com.wicket.okrcomponent.integration.dto.QueryConfItemMatchAnswerDetailComReqDto queryConfItemMatchAnswerDetailComReqDto_1 = new com.wicket.okrcomponent.integration.dto.QueryConfItemMatchAnswerDetailComReqDto();
            queryConfItemMatchAnswerDetailComReqDto_1.setConfItemCode("ADD_EVA_TEMP_OPERATE_WAIT");//CUSTOM_CONVENTION//sourceId:1022540_1_44728
            queryConfItemMatchAnswerDetailComReqDto_1.setConfSchemeCode("COM_CONF_SCHEME");//CUSTOM_CONVENTION//sourceId:1022541_1_44728
            queryConfItemMatchAnswerDetailComReqDto_1.setIsPlatData("TRUE");//sourceId:1022542_1_44728

            /*D2-3查评价模板新增操作异常等待文案[2486]   */
            Assert.isNull(queryConfItemMatchAnswerDetailComReqDto_1.getConfItemCode(), "D3判断租户规划证书及异常(公共)-D2-3查评价模板新增操作异常等待文案-配置项标识不能为空", false);
            Assert.isNull(queryConfItemMatchAnswerDetailComReqDto_1.getConfSchemeCode(), "D3判断租户规划证书及异常(公共)-D2-3查评价模板新增操作异常等待文案-配置方案标识不能为空", false);
            Assert.isNull(queryConfItemMatchAnswerDetailComReqDto_1.getIsPlatData(), "D3判断租户规划证书及异常(公共)-D2-3查评价模板新增操作异常等待文案-是否标准答案不能为空", false);
            queryConfItemMatchAnswerDetailComRespDto_2 = confSchemeService.queryConfItemMatchAnswerDetailCom(queryConfItemMatchAnswerDetailComReqDto_1).getData()/*vcase invoke 跨dubbo调用;*/;


//ModelCode: receptionService
            ImplementAcceptFieldRespDto receptionServiceRes_8 = null;
            if (queryConfItemMatchAnswerDetailComRespDto_2 != null) {
                ImplementAcceptFieldReqDto receptionServiceReq_5 = new ImplementAcceptFieldReqDto();
                if (receptionServiceRes_6 != null) {
                    receptionServiceReq_5.setKeyOperateType(receptionServiceRes_6.getKeyOperateType());//SimpleFieldAssign//sourceId:910713_1_44726
                }
                if (queryConfItemMatchAnswerDetailComRespDto_2 != null) {
                    receptionServiceReq_5.setServiceAbnormalWords(queryConfItemMatchAnswerDetailComRespDto_2.getEndValue());//SimpleFieldAssign//sourceId:910712_1_44726
                }

                /*M3-接收钥匙可用类型及授权异常文案[6100]  用于特殊方法接收上游入参。 */
                Assert.isNull(receptionServiceReq_5.getKeyOperateType(), "D3判断租户规划证书及异常(公共)-M3-接收钥匙可用类型及授权异常文案-钥匙操作类型不能为空", false);
                receptionServiceRes_8 = nbSecurity.implementAcceptField(receptionServiceReq_5);


                receptionServiceRes_3 = receptionServiceRes_8;
            }
        }
        JudgeDetermineTenantCertificateAvailabilityAbnormalComRespDto retData = new JudgeDetermineTenantCertificateAvailabilityAbnormalComRespDto();
        if (receptionServiceRes_3 != null) {
            retData.setKeyOperateType(receptionServiceRes_3.getKeyOperateType());//SimpleFieldAssign//sourceId:910931_1
            retData.setServiceAbnormalWords(receptionServiceRes_3.getServiceAbnormalWords());//SimpleFieldAssign//sourceId:910932_1
        }


        return retData;
    }

    /**
     * D3判断租户规划钥匙可用[6536]
     * gen by moon at 5/13/2023, 9:31:37 PM
     */
    @Trace(operationName = "D3判断租户规划钥匙可用")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public JudgeDetermineTenantKeyAvailabilityRespDto judgeDetermineTenantKeyAvailability(JudgeDetermineTenantKeyAvailabilityReqDto reqDto) {


        ImplementAcceptFieldRespDto receptionServiceRes_5 = null;
        JudgeDetermineTenantCertificateAvailabilityAbnormalComRespDto judgeDetermineTenantCertificateAvailabilityAbnormalComRespDto_1 = null;
//virtualUsage M3约定是否有显示权限为“是”  40706
        //ModelCode: receptionService
        ImplementAcceptFieldRespDto receptionServiceRes = null;
        ImplementAcceptFieldReqDto receptionServiceReq = new ImplementAcceptFieldReqDto();
        receptionServiceReq.setIsHaveDisplayPower("TRUE");//sourceId:911205_1_40706

        /*M3约定是否有显示权限为“是”[6100]  用于特殊方法接收上游入参。 */
        Assert.isNull(receptionServiceReq.getIsHaveDisplayPower(), "D3判断租户规划钥匙可用-M3约定是否有显示权限为“是”-是否有显示权限不能为空", false);
        receptionServiceRes = nbSecurity.implementAcceptField(receptionServiceReq);


//virtualUsage M3约定是否有显示权限为“否”  40707
        //ModelCode: receptionService
        ImplementAcceptFieldRespDto receptionServiceRes_2 = null;
        ImplementAcceptFieldReqDto receptionServiceReq_1 = new ImplementAcceptFieldReqDto();
        receptionServiceReq_1.setIsHaveDisplayPower("FALSE");//sourceId:911934_1_40707

        /*M3约定是否有显示权限为“否”[6100]  用于特殊方法接收上游入参。 */
        Assert.isNull(receptionServiceReq_1.getIsHaveDisplayPower(), "D3判断租户规划钥匙可用-M3约定是否有显示权限为“否”-是否有显示权限不能为空", false);
        receptionServiceRes_2 = nbSecurity.implementAcceptField(receptionServiceReq_1);


//virtualUsage D1-2查询当前用户部门个人的父数据权限  40692
        QueryCurrentUserRecordTributPowerDetailComRespDto queryCurrentUserRecordTributPowerDetailComRespDto = null;
        QueryCurrentUserRecordTributPowerDetailComReqDto queryCurrentUserRecordTributPowerDetailComReqDto = new QueryCurrentUserRecordTributPowerDetailComReqDto();
        queryCurrentUserRecordTributPowerDetailComReqDto.setAllocationObjectId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID//sourceId:910961_1_40692
        queryCurrentUserRecordTributPowerDetailComReqDto.setTypeCode("PERSONAL_DEPARTMENT");//sourceId:910964_1_40692
        queryCurrentUserRecordTributPowerDetailComReqDto.setPrivacyCategory("MAIN_DATA_PRIVACY");//sourceId:910965_1_40692
        queryCurrentUserRecordTributPowerDetailComReqDto.setBusinessPurposes("ALL");//sourceId:910966_1_40692
        if (reqDto != null) {
            queryCurrentUserRecordTributPowerDetailComReqDto.setPrivacyCode(reqDto.getPrivacyCode());//SimpleFieldAssign//sourceId:910960_1_40692
        }

        /*D1-2查询当前用户部门个人的父数据权限[4546]   */
        Assert.isNull(queryCurrentUserRecordTributPowerDetailComReqDto.getPrivacyCode(), "D3判断租户规划钥匙可用-D1-2查询当前用户部门个人的父数据权限-权限标识不能为空", false);
        Assert.isNull(queryCurrentUserRecordTributPowerDetailComReqDto.getAllocationObjectId(), "D3判断租户规划钥匙可用-D1-2查询当前用户部门个人的父数据权限-分配对象ID不能为空", false);
        Assert.isNull(queryCurrentUserRecordTributPowerDetailComReqDto.getTypeCode(), "D3判断租户规划钥匙可用-D1-2查询当前用户部门个人的父数据权限-分配对象类型编码不能为空", false);
        Assert.isNull(queryCurrentUserRecordTributPowerDetailComReqDto.getPrivacyCategory(), "D3判断租户规划钥匙可用-D1-2查询当前用户部门个人的父数据权限-权限类别不能为空", false);
        Assert.isNull(queryCurrentUserRecordTributPowerDetailComReqDto.getBusinessPurposes(), "D3判断租户规划钥匙可用-D1-2查询当前用户部门个人的父数据权限-权限业务用途不能为空", false);
        queryCurrentUserRecordTributPowerDetailComRespDto = powerService.queryCurrentUserRecordTributPowerDetailCom(queryCurrentUserRecordTributPowerDetailComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        if ((queryCurrentUserRecordTributPowerDetailComRespDto != null && queryCurrentUserRecordTributPowerDetailComRespDto.getPrivacyCode() != null)) {
            //if(D1-2查询当前用户部门个人的父数据权限.权限标识 值不等于空 )  40693

//ModelCode: receptionService
            ImplementAcceptFieldRespDto receptionServiceRes_4 = null;
            ImplementAcceptFieldReqDto receptionServiceReq_2 = new ImplementAcceptFieldReqDto();
            if (receptionServiceRes != null) {
                receptionServiceReq_2.setIsHaveDisplayPower(receptionServiceRes.getIsHaveDisplayPower());//SimpleFieldAssign//sourceId:911936_1_40708
            }

            /*M3接收是否显示权限字段[6100]  用于特殊方法接收上游入参。 */
            Assert.isNull(receptionServiceReq_2.getIsHaveDisplayPower(), "D3判断租户规划钥匙可用-M3接收是否显示权限字段-是否有显示权限不能为空", false);
            receptionServiceRes_4 = nbSecurity.implementAcceptField(receptionServiceReq_2);


            receptionServiceRes_5 = receptionServiceRes_4;
            JudgeDetermineTenantCertificateAvailabilityAbnormalComRespDto judgeDetermineTenantCertificateAvailabilityAbnormalComRespDto = null;
            JudgeDetermineTenantCertificateAvailabilityAbnormalComReqDto judgeDetermineTenantCertificateAvailabilityAbnormalComReqDto = new JudgeDetermineTenantCertificateAvailabilityAbnormalComReqDto();
            if (reqDto != null) {
                judgeDetermineTenantCertificateAvailabilityAbnormalComReqDto.setAuthorizationKeyTypeCode(reqDto.getAuthorizationKeyTypeCode());//SimpleFieldAssign//sourceId:932180_1_40713
            }

            /*D3判断租户规划证书及异常(公共)[6535]   */
            Assert.isNull(judgeDetermineTenantCertificateAvailabilityAbnormalComReqDto.getAuthorizationKeyTypeCode(), "D3判断租户规划钥匙可用-D3判断租户规划证书及异常(公共)-开通钥匙类型标识不能为空", false);
            judgeDetermineTenantCertificateAvailabilityAbnormalComRespDto = judgeDetermineTenantCertificateAvailabilityAbnormalCom(judgeDetermineTenantCertificateAvailabilityAbnormalComReqDto)/*vcase invoke 同服务,同domain*/;


            judgeDetermineTenantCertificateAvailabilityAbnormalComRespDto_1 = judgeDetermineTenantCertificateAvailabilityAbnormalComRespDto;
        } else if ((queryCurrentUserRecordTributPowerDetailComRespDto != null && queryCurrentUserRecordTributPowerDetailComRespDto.getPrivacyCode() == null)) {
            //elseif(D1-2查询当前用户部门个人的父数据权限.权限标识 值等于空 )  40695

            QueryCurrentUserRecordTributPowerDetailComRespDto queryCurrentUserRecordTributPowerDetailComRespDto_2 = null;
            QueryCurrentUserRecordTributPowerDetailComReqDto queryCurrentUserRecordTributPowerDetailComReqDto_1 = new QueryCurrentUserRecordTributPowerDetailComReqDto();
            queryCurrentUserRecordTributPowerDetailComReqDto_1.setAllocationObjectId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID//sourceId:910968_1_40702
            queryCurrentUserRecordTributPowerDetailComReqDto_1.setTypeCode("PERSONAL_DEPARTMENT");//sourceId:910971_1_40702
            queryCurrentUserRecordTributPowerDetailComReqDto_1.setPrivacyCategory("SUB_DATA_PRIVACY");//sourceId:910972_1_40702
            queryCurrentUserRecordTributPowerDetailComReqDto_1.setBusinessPurposes("ALL");//sourceId:910973_1_40702
            if (reqDto != null) {
                queryCurrentUserRecordTributPowerDetailComReqDto_1.setPrivacyCode(reqDto.getAuthorizationKeyTypeCode());//SimpleFieldAssign//sourceId:910967_1_40702
            }

            /*D1-2查询当前用户部门个人的子数据权限[4546]   */
            Assert.isNull(queryCurrentUserRecordTributPowerDetailComReqDto_1.getPrivacyCode(), "D3判断租户规划钥匙可用-D1-2查询当前用户部门个人的子数据权限-权限标识不能为空", false);
            Assert.isNull(queryCurrentUserRecordTributPowerDetailComReqDto_1.getAllocationObjectId(), "D3判断租户规划钥匙可用-D1-2查询当前用户部门个人的子数据权限-分配对象ID不能为空", false);
            Assert.isNull(queryCurrentUserRecordTributPowerDetailComReqDto_1.getTypeCode(), "D3判断租户规划钥匙可用-D1-2查询当前用户部门个人的子数据权限-分配对象类型编码不能为空", false);
            Assert.isNull(queryCurrentUserRecordTributPowerDetailComReqDto_1.getPrivacyCategory(), "D3判断租户规划钥匙可用-D1-2查询当前用户部门个人的子数据权限-权限类别不能为空", false);
            Assert.isNull(queryCurrentUserRecordTributPowerDetailComReqDto_1.getBusinessPurposes(), "D3判断租户规划钥匙可用-D1-2查询当前用户部门个人的子数据权限-权限业务用途不能为空", false);
            queryCurrentUserRecordTributPowerDetailComRespDto_2 = powerService.queryCurrentUserRecordTributPowerDetailCom(queryCurrentUserRecordTributPowerDetailComReqDto_1).getData()/*vcase invoke 跨dubbo调用;*/;


            if ((queryCurrentUserRecordTributPowerDetailComRespDto_2 != null && queryCurrentUserRecordTributPowerDetailComRespDto_2.getPrivacyCode() != null)) {
                //if(D1-2查询当前用户部门个人的子数据权限.权限标识 值不等于空 )  40704

//ModelCode: receptionService
                ImplementAcceptFieldRespDto receptionServiceRes_6 = null;
                ImplementAcceptFieldReqDto receptionServiceReq_3 = new ImplementAcceptFieldReqDto();
                if (receptionServiceRes != null) {
                    receptionServiceReq_3.setIsHaveDisplayPower(receptionServiceRes.getIsHaveDisplayPower());//SimpleFieldAssign//sourceId:911936_1_40710
                }

                /*M3接收是否显示权限字段[6100]  用于特殊方法接收上游入参。 */
                Assert.isNull(receptionServiceReq_3.getIsHaveDisplayPower(), "D3判断租户规划钥匙可用-M3接收是否显示权限字段-是否有显示权限不能为空", false);
                receptionServiceRes_6 = nbSecurity.implementAcceptField(receptionServiceReq_3);


                receptionServiceRes_5 = receptionServiceRes_6;
                JudgeDetermineTenantCertificateAvailabilityAbnormalComRespDto judgeDetermineTenantCertificateAvailabilityAbnormalComRespDto_2 = null;
                JudgeDetermineTenantCertificateAvailabilityAbnormalComReqDto judgeDetermineTenantCertificateAvailabilityAbnormalComReqDto_1 = new JudgeDetermineTenantCertificateAvailabilityAbnormalComReqDto();
                if (reqDto != null) {
                    judgeDetermineTenantCertificateAvailabilityAbnormalComReqDto_1.setAuthorizationKeyTypeCode(reqDto.getAuthorizationKeyTypeCode());//SimpleFieldAssign//sourceId:932180_1_40714
                }

                /*D3判断租户规划证书及异常(公共)[6535]   */
                Assert.isNull(judgeDetermineTenantCertificateAvailabilityAbnormalComReqDto_1.getAuthorizationKeyTypeCode(), "D3判断租户规划钥匙可用-D3判断租户规划证书及异常(公共)-开通钥匙类型标识不能为空", false);
                judgeDetermineTenantCertificateAvailabilityAbnormalComRespDto_2 = judgeDetermineTenantCertificateAvailabilityAbnormalCom(judgeDetermineTenantCertificateAvailabilityAbnormalComReqDto_1)/*vcase invoke 同服务,同domain*/;


                judgeDetermineTenantCertificateAvailabilityAbnormalComRespDto_1 = judgeDetermineTenantCertificateAvailabilityAbnormalComRespDto_2;
            } else if ((queryCurrentUserRecordTributPowerDetailComRespDto_2 != null && queryCurrentUserRecordTributPowerDetailComRespDto_2.getPrivacyCode() == null)) {
                //elseif(D1-2查询当前用户部门个人的子数据权限.权限标识 值等于空 )  40705

//ModelCode: receptionService
                ImplementAcceptFieldRespDto receptionServiceRes_7 = null;
                ImplementAcceptFieldReqDto receptionServiceReq_4 = new ImplementAcceptFieldReqDto();
                if (receptionServiceRes_2 != null) {
                    receptionServiceReq_4.setIsHaveDisplayPower(receptionServiceRes_2.getIsHaveDisplayPower());//SimpleFieldAssign//sourceId:911936_1_40711
                }

                /*M3接收是否显示权限字段[6100]  用于特殊方法接收上游入参。 */
                Assert.isNull(receptionServiceReq_4.getIsHaveDisplayPower(), "D3判断租户规划钥匙可用-M3接收是否显示权限字段-是否有显示权限不能为空", false);
                receptionServiceRes_7 = nbSecurity.implementAcceptField(receptionServiceReq_4);


                receptionServiceRes_5 = receptionServiceRes_7;
            }
        }
        JudgeDetermineTenantKeyAvailabilityRespDto retData = new JudgeDetermineTenantKeyAvailabilityRespDto();
        if (receptionServiceRes_5 != null) {
            retData.setIsHaveDisplayPower(receptionServiceRes_5.getIsHaveDisplayPower());//SimpleFieldAssign//sourceId:911955_1
        }
        if (judgeDetermineTenantCertificateAvailabilityAbnormalComRespDto_1 != null) {
            retData.setKeyOperateType(judgeDetermineTenantCertificateAvailabilityAbnormalComRespDto_1.getKeyOperateType());//SimpleFieldAssign//sourceId:911956_1
            retData.setServiceAbnormalWords(judgeDetermineTenantCertificateAvailabilityAbnormalComRespDto_1.getServiceAbnormalWords());//SimpleFieldAssign//sourceId:911957_1
        }


        return retData;
    }

    /**
     * D3执行私有化部署可用分析(公共)[6539]
     * gen by moon at 7/16/2023, 11:38:38 PM
     */
    @Trace(operationName = "D3执行私有化部署可用分析(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public ImplementPrivatizationArrangeEmpowerAvailableComRespDto implementPrivatizationArrangeEmpowerAvailableCom(ImplementPrivatizationArrangeEmpowerAvailableComReqDto reqDto) {


        ImplementAcceptFieldRespDto receptionServiceRes_3 = null;
        if ((reqDto != null && reqDto.getAuthType() != null && reqDto.getAuthType().equals("QUANTITY"))) {
            //if(D3执行私有化部署可用分析(公共).授权类型 等于 数量型)  40721

            ObtainImpowerObjectInstantiateDataComRespDto obtainImpowerObjectInstantiateDataComRespDto = null;
            ObtainImpowerObjectInstantiateDataComReqDto obtainImpowerObjectInstantiateDataComReqDto = new ObtainImpowerObjectInstantiateDataComReqDto();
            if (reqDto != null) {
                obtainImpowerObjectInstantiateDataComReqDto.setSchOpenRecordId(reqDto.getSchOpenRecordId());//SimpleFieldAssign//sourceId:979370_1_42843
                obtainImpowerObjectInstantiateDataComReqDto.setResultAspObjType(reqDto.getResultAspObjType());//SimpleFieldAssign//sourceId:1089157_1_42843
                obtainImpowerObjectInstantiateDataComReqDto.setResultAspObjId(reqDto.getResultAspObjId());//SimpleFieldAssign//sourceId:1089158_1_42843
                obtainImpowerObjectInstantiateDataComReqDto.setAscriptionSpaceId(reqDto.getAscriptionSpaceId());//SimpleFieldAssign//sourceId:979362_1_42843
            }

            /*D3获取授权对象实例数据(公共)[6943]   */
            Assert.isNull(obtainImpowerObjectInstantiateDataComReqDto.getSchOpenRecordId(), "D3执行私有化部署可用分析(公共)-D3获取授权对象实例数据(公共)-开通钥匙ID不能为空", false);
            Assert.isNull(obtainImpowerObjectInstantiateDataComReqDto.getResultAspObjType(), "D3执行私有化部署可用分析(公共)-D3获取授权对象实例数据(公共)-开通对象类型编码不能为空", false);
            Assert.isNull(obtainImpowerObjectInstantiateDataComReqDto.getAscriptionSpaceId(), "D3执行私有化部署可用分析(公共)-D3获取授权对象实例数据(公共)-归属空间ID不能为空", false);
            obtainImpowerObjectInstantiateDataComRespDto = obtainImpowerObjectInstantiateDataCom(obtainImpowerObjectInstantiateDataComReqDto)/*vcase invoke 同服务,同domain*/;


            CalculateCalcServiceCollectionComRespDto calculateCalcServiceCollectionComRespDto = null;
            if (obtainImpowerObjectInstantiateDataComRespDto != null) {
                CalculateCalcServiceCollectionComReqDto calculateCalcServiceCollectionComReqDto = new CalculateCalcServiceCollectionComReqDto();
                calculateCalcServiceCollectionComReqDto.setCalcFormula("SUBTRACTION_OF_TWO_NUM");//sourceId:912241_1_40725
                if (reqDto != null) {
                    calculateCalcServiceCollectionComReqDto.setCalcPara1(reqDto.getRemainingQty() != null ? Double.valueOf(reqDto.getRemainingQty()) : null);//SimpleFieldAssign//sourceId:912243_1_40725
                }
                if (obtainImpowerObjectInstantiateDataComRespDto != null) {
                    calculateCalcServiceCollectionComReqDto.setCalcPara2(obtainImpowerObjectInstantiateDataComRespDto.getComNumField() != null ? Double.valueOf(obtainImpowerObjectInstantiateDataComRespDto.getComNumField()) : null);//SimpleFieldAssign//sourceId:912244_1_40725
                }

                /*D4-授权数量减当前数量[5091]   */
                Assert.isNull(calculateCalcServiceCollectionComReqDto.getCalcFormula(), "D3执行私有化部署可用分析(公共)-D4-授权数量减当前数量-通用计算公式不能为空", false);
                Assert.isNull(calculateCalcServiceCollectionComReqDto.getCalcPara1(), "D3执行私有化部署可用分析(公共)-D4-授权数量减当前数量-计算入参1不能为空", false);
                Assert.isNull(calculateCalcServiceCollectionComReqDto.getCalcPara2(), "D3执行私有化部署可用分析(公共)-D4-授权数量减当前数量-计算入参2不能为空", false);
                calculateCalcServiceCollectionComRespDto = fwCalcCalculationRulesClient.calculateCalcServiceCollectionCom(calculateCalcServiceCollectionComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


            }
            if ((calculateCalcServiceCollectionComRespDto != null && calculateCalcServiceCollectionComRespDto.getCalcResult() <= 0)) {
                //if(D4-授权数量减当前数量.计算结果 小于等于 0)  40728

//ModelCode: receptionService
                ImplementAcceptFieldRespDto receptionServiceRes = null;
                ImplementAcceptFieldReqDto receptionServiceReq = new ImplementAcceptFieldReqDto();
                receptionServiceReq.setAuthUseType("QUANTITY_INS_DISABLED");//sourceId:913112_1_40729

                /*M3授权使用类型：数量不足不可用[6100]  用于特殊方法接收上游入参。 */
                Assert.isNull(receptionServiceReq.getAuthUseType(), "D3执行私有化部署可用分析(公共)-M3授权使用类型：数量不足不可用-授权使用类型不能为空", false);
                receptionServiceRes = nbSecurity.implementAcceptField(receptionServiceReq);


//ModelCode: receptionService
                ImplementAcceptFieldRespDto receptionServiceRes_2 = null;
                ImplementAcceptFieldReqDto receptionServiceReq_1 = new ImplementAcceptFieldReqDto();
                if (receptionServiceRes != null) {
                    receptionServiceReq_1.setAuthUseType(receptionServiceRes.getAuthUseType());//SimpleFieldAssign//sourceId:913116_1_40736
                }

                /*M3接收授权使用类型出参[6100]  用于特殊方法接收上游入参。 */
                Assert.isNull(receptionServiceReq_1.getAuthUseType(), "D3执行私有化部署可用分析(公共)-M3接收授权使用类型出参-授权使用类型不能为空", false);
                receptionServiceRes_2 = nbSecurity.implementAcceptField(receptionServiceReq_1);


                receptionServiceRes_3 = receptionServiceRes_2;
            } else if ((calculateCalcServiceCollectionComRespDto != null && calculateCalcServiceCollectionComRespDto.getCalcResult() > 0)) {
                //elseif(D4-授权数量减当前数量.计算结果 大于 0)  40730

//ModelCode: receptionService
                ImplementAcceptFieldRespDto receptionServiceRes_4 = null;
                ImplementAcceptFieldReqDto receptionServiceReq_2 = new ImplementAcceptFieldReqDto();
                receptionServiceReq_2.setAuthUseType("USABLE");//sourceId:912469_1_40731

                /*M3授权使类型：可用[6100]  用于特殊方法接收上游入参。 */
                Assert.isNull(receptionServiceReq_2.getAuthUseType(), "D3执行私有化部署可用分析(公共)-M3授权使类型：可用-授权使用类型不能为空", false);
                receptionServiceRes_4 = nbSecurity.implementAcceptField(receptionServiceReq_2);


//ModelCode: receptionService
                ImplementAcceptFieldRespDto receptionServiceRes_6 = null;
                ImplementAcceptFieldReqDto receptionServiceReq_3 = new ImplementAcceptFieldReqDto();
                if (receptionServiceRes_4 != null) {
                    receptionServiceReq_3.setAuthUseType(receptionServiceRes_4.getAuthUseType());//SimpleFieldAssign//sourceId:913116_1_40737
                }

                /*M3接收授权使用类型出参[6100]  用于特殊方法接收上游入参。 */
                Assert.isNull(receptionServiceReq_3.getAuthUseType(), "D3执行私有化部署可用分析(公共)-M3接收授权使用类型出参-授权使用类型不能为空", false);
                receptionServiceRes_6 = nbSecurity.implementAcceptField(receptionServiceReq_3);


                receptionServiceRes_3 = receptionServiceRes_6;
            }
        } else if ((reqDto != null && reqDto.getAuthType() != null && reqDto.getAuthType().equals("CYCLE_TIME") || reqDto != null && reqDto.getAuthType() != null && reqDto.getAuthType().equals("FIXED_TIME"))) {
            //elseif((D3执行私有化部署可用分析(公共).授权类型 等于 周期时间型 or D3执行私有化部署可用分析(公共).授权类型 等于 固定时间型))  40722

            CheckTimeScopeSearchComRespDto checkTimeScopeSearchComRespDto = null;
            CheckTimeScopeSearchComReqDto checkTimeScopeSearchComReqDto = new CheckTimeScopeSearchComReqDto();
            checkTimeScopeSearchComReqDto.setCurrentTime(CommonFunctionHelper.getCurrentTime());//SYSTEM_CURRENT_TIME//sourceId:912254_1_40726
            if (reqDto != null) {
                checkTimeScopeSearchComReqDto.setCompareTime(reqDto.getEndTime());//SimpleFieldAssign//sourceId:912256_1_40726
            }

            /*D2比较授权时间有效性[3297]   */
            Assert.isNull(checkTimeScopeSearchComReqDto.getCurrentTime(), "D3执行私有化部署可用分析(公共)-D2比较授权时间有效性-当前时间不能为空", false);
            Assert.isNull(checkTimeScopeSearchComReqDto.getCompareTime(), "D3执行私有化部署可用分析(公共)-D2比较授权时间有效性-比较时间不能为空", false);
            checkTimeScopeSearchComRespDto = fwCompDivineDataClient.checkTimeScopeSearchCom(checkTimeScopeSearchComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


            if ((checkTimeScopeSearchComRespDto != null && checkTimeScopeSearchComRespDto.getTimeCompareResult() != null && checkTimeScopeSearchComRespDto.getTimeCompareResult().equals("LATER"))) {
                //if(D2比较授权时间有效性.时间比较结果 等于 之后（大于）)  40727

//ModelCode: receptionService
                ImplementAcceptFieldRespDto receptionServiceRes_7 = null;
                ImplementAcceptFieldReqDto receptionServiceReq_4 = new ImplementAcceptFieldReqDto();
                receptionServiceReq_4.setAuthUseType("EXPIRE__DISABLED");//sourceId:913114_1_40732

                /*M3授权使用类型：到期不可用[6100]  用于特殊方法接收上游入参。 */
                Assert.isNull(receptionServiceReq_4.getAuthUseType(), "D3执行私有化部署可用分析(公共)-M3授权使用类型：到期不可用-授权使用类型不能为空", false);
                receptionServiceRes_7 = nbSecurity.implementAcceptField(receptionServiceReq_4);


//ModelCode: receptionService
                ImplementAcceptFieldRespDto receptionServiceRes_9 = null;
                ImplementAcceptFieldReqDto receptionServiceReq_5 = new ImplementAcceptFieldReqDto();
                if (receptionServiceRes_7 != null) {
                    receptionServiceReq_5.setAuthUseType(receptionServiceRes_7.getAuthUseType());//SimpleFieldAssign//sourceId:913116_1_40738
                }

                /*M3接收授权使用类型出参[6100]  用于特殊方法接收上游入参。 */
                Assert.isNull(receptionServiceReq_5.getAuthUseType(), "D3执行私有化部署可用分析(公共)-M3接收授权使用类型出参-授权使用类型不能为空", false);
                receptionServiceRes_9 = nbSecurity.implementAcceptField(receptionServiceReq_5);


                receptionServiceRes_3 = receptionServiceRes_9;
            } else if ((checkTimeScopeSearchComRespDto != null && checkTimeScopeSearchComRespDto.getTimeCompareResult() != null && checkTimeScopeSearchComRespDto.getTimeCompareResult().equals("BEFORE") || checkTimeScopeSearchComRespDto != null && checkTimeScopeSearchComRespDto.getTimeCompareResult() != null && checkTimeScopeSearchComRespDto.getTimeCompareResult().equals("PRESENT"))) {
                //elseif((D2比较授权时间有效性.时间比较结果 等于 之前（小于） and D2比较授权时间有效性.时间比较结果 等于 当前（等于）))  40733

//ModelCode: receptionService
                ImplementAcceptFieldRespDto receptionServiceRes_10 = null;
                ImplementAcceptFieldReqDto receptionServiceReq_6 = new ImplementAcceptFieldReqDto();
                receptionServiceReq_6.setAuthUseType("USABLE");//sourceId:912469_1_40734

                /*M3授权使类型：可用[6100]  用于特殊方法接收上游入参。 */
                Assert.isNull(receptionServiceReq_6.getAuthUseType(), "D3执行私有化部署可用分析(公共)-M3授权使类型：可用-授权使用类型不能为空", false);
                receptionServiceRes_10 = nbSecurity.implementAcceptField(receptionServiceReq_6);


//ModelCode: receptionService
                ImplementAcceptFieldRespDto receptionServiceRes_11 = null;
                ImplementAcceptFieldReqDto receptionServiceReq_7 = new ImplementAcceptFieldReqDto();
                if (receptionServiceRes_10 != null) {
                    receptionServiceReq_7.setAuthUseType(receptionServiceRes_10.getAuthUseType());//SimpleFieldAssign//sourceId:913116_1_40739
                }

                /*M3接收授权使用类型出参[6100]  用于特殊方法接收上游入参。 */
                Assert.isNull(receptionServiceReq_7.getAuthUseType(), "D3执行私有化部署可用分析(公共)-M3接收授权使用类型出参-授权使用类型不能为空", false);
                receptionServiceRes_11 = nbSecurity.implementAcceptField(receptionServiceReq_7);


                receptionServiceRes_3 = receptionServiceRes_11;
            }
        }
        ImplementPrivatizationArrangeEmpowerAvailableComRespDto retData = new ImplementPrivatizationArrangeEmpowerAvailableComRespDto();
        if (receptionServiceRes_3 != null) {
            retData.setAuthUseType(receptionServiceRes_3.getAuthUseType());//SimpleFieldAssign//sourceId:913153_1
        }


        return retData;
    }

    /**
     * D3判断通用租户规划证书及异常(公共)[6600]
     * gen by moon at 7/16/2023, 11:38:44 PM
     */
    @Trace(operationName = "D3判断通用租户规划证书及异常(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public JudgeStandardDetermineTenantCertificateAvailabilityAbnormalComRespDto judgeStandardDetermineTenantCertificateAvailabilityAbnormalCom(JudgeStandardDetermineTenantCertificateAvailabilityAbnormalComReqDto reqDto) {


        ImplementAcceptFieldRespDto receptionServiceRes_1 = null;
//virtualUsage D2获取私有化或saas参数分析(公共)  41207
        ObtainSecurityParamAvailableComRespDto obtainSecurityParamAvailableComRespDto = null;
        ObtainSecurityParamAvailableComReqDto obtainSecurityParamAvailableComReqDto = new ObtainSecurityParamAvailableComReqDto();
        if (reqDto != null) {
            obtainSecurityParamAvailableComReqDto.setAuthorizationKeyTypeCode(reqDto.getAuthorizationKeyTypeCode());//SimpleFieldAssign//sourceId:932196_1_41207
            obtainSecurityParamAvailableComReqDto.setTenantSpaceId(reqDto.getTenantSpaceId());//SimpleFieldAssign//sourceId:927499_1_41207
        }

        /*D2获取私有化或saas参数分析(公共)[6533]   */
        Assert.isNull(obtainSecurityParamAvailableComReqDto.getAuthorizationKeyTypeCode(), "D3判断通用租户规划证书及异常(公共)-D2获取私有化或saas参数分析(公共)-开通钥匙类型标识不能为空", false);
        obtainSecurityParamAvailableComRespDto = fwCompSecurityClient.obtainSecurityParamAvailableCom(obtainSecurityParamAvailableComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        if ((obtainSecurityParamAvailableComRespDto != null && obtainSecurityParamAvailableComRespDto.getDeployTypeCode() != null && obtainSecurityParamAvailableComRespDto.getDeployTypeCode().equals("SAAS"))) {
            //if(D2获取私有化或saas参数分析(公共).部署类型编码 等于 SAAS部署)  41208

            JudgeArrangeEmpowerAvailableComRespDto judgeArrangeEmpowerAvailableComRespDto = null;
            if (obtainSecurityParamAvailableComRespDto != null) {
                JudgeArrangeEmpowerAvailableComReqDto judgeArrangeEmpowerAvailableComReqDto = new JudgeArrangeEmpowerAvailableComReqDto();
                if (obtainSecurityParamAvailableComRespDto != null) {
                    judgeArrangeEmpowerAvailableComReqDto.setAuthUseType(obtainSecurityParamAvailableComRespDto.getAuthUseType());//SimpleFieldAssign//sourceId:927129_1_41210
                }

                /*D2-3判断部署授权可用分析(公共)[6534]   */
                Assert.isNull(judgeArrangeEmpowerAvailableComReqDto.getAuthUseType(), "D3判断通用租户规划证书及异常(公共)-D2-3判断部署授权可用分析(公共)-授权使用类型不能为空", false);
                judgeArrangeEmpowerAvailableComRespDto = fwCompSecurityClient.judgeArrangeEmpowerAvailableCom(judgeArrangeEmpowerAvailableComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


            }
//ModelCode: receptionService
            ImplementAcceptFieldRespDto receptionServiceRes = null;
            if (judgeArrangeEmpowerAvailableComRespDto != null) {
                ImplementAcceptFieldReqDto receptionServiceReq = new ImplementAcceptFieldReqDto();
                if (judgeArrangeEmpowerAvailableComRespDto != null) {
                    receptionServiceReq.setKeyOperateType(judgeArrangeEmpowerAvailableComRespDto.getKeyOperateType());//SimpleFieldAssign//sourceId:927392_1_41212
                    receptionServiceReq.setServiceAbnormalWords(judgeArrangeEmpowerAvailableComRespDto.getServiceAbnormalWords());//SimpleFieldAssign//sourceId:927393_1_41212
                }

                /*M3-接收钥匙可用类型及授权异常文案[6100]  用于特殊方法接收上游入参。 */
                Assert.isNull(receptionServiceReq.getKeyOperateType(), "D3判断通用租户规划证书及异常(公共)-M3-接收钥匙可用类型及授权异常文案-钥匙操作类型不能为空", false);
                receptionServiceRes = nbSecurity.implementAcceptField(receptionServiceReq);


                receptionServiceRes_1 = receptionServiceRes;
            }
        } else if ((obtainSecurityParamAvailableComRespDto != null && obtainSecurityParamAvailableComRespDto.getDeployTypeCode() != null && obtainSecurityParamAvailableComRespDto.getDeployTypeCode().equals("LOCALITY"))) {
            //elseif(D2获取私有化或saas参数分析(公共).部署类型编码 等于 本地化部署)  41209

            ImplementPrivatizationArrangeEmpowerAvailableComRespDto implementPrivatizationArrangeEmpowerAvailableComRespDto = null;
            if (obtainSecurityParamAvailableComRespDto != null) {
                ImplementPrivatizationArrangeEmpowerAvailableComReqDto implementPrivatizationArrangeEmpowerAvailableComReqDto = new ImplementPrivatizationArrangeEmpowerAvailableComReqDto();
                if (obtainSecurityParamAvailableComRespDto != null) {
                    implementPrivatizationArrangeEmpowerAvailableComReqDto.setSchOpenRecordId(obtainSecurityParamAvailableComRespDto.getSchOpenRecordId());//SimpleFieldAssign//sourceId:927371_1_41213
                    implementPrivatizationArrangeEmpowerAvailableComReqDto.setAuthType(obtainSecurityParamAvailableComRespDto.getAuthType());//SimpleFieldAssign//sourceId:927372_1_41213
                    implementPrivatizationArrangeEmpowerAvailableComReqDto.setResultAspObjType(obtainSecurityParamAvailableComRespDto.getApplObjType());//SimpleFieldAssign//sourceId:1089203_1_41213
                    implementPrivatizationArrangeEmpowerAvailableComReqDto.setResultAspObjId(obtainSecurityParamAvailableComRespDto.getAuthorizationObjectId());//SimpleFieldAssign//sourceId:1089204_1_41213
                    implementPrivatizationArrangeEmpowerAvailableComReqDto.setRemainingQty(obtainSecurityParamAvailableComRespDto.getAuthorizationNum() != null ? Long.valueOf(obtainSecurityParamAvailableComRespDto.getAuthorizationNum()) : null);//SimpleFieldAssign//sourceId:927373_1_41213
                    implementPrivatizationArrangeEmpowerAvailableComReqDto.setEndTime(obtainSecurityParamAvailableComRespDto.getAuthorizationEndTime());//SimpleFieldAssign//sourceId:927374_1_41213
                }
                if (reqDto != null) {
                    implementPrivatizationArrangeEmpowerAvailableComReqDto.setAscriptionSpaceId(reqDto.getTenantSpaceId());//SimpleFieldAssign//sourceId:979374_1_41213
                }

                /*D3执行私有化部署可用分析(公共)[6539]   */
                Assert.isNull(implementPrivatizationArrangeEmpowerAvailableComReqDto.getSchOpenRecordId(), "D3判断通用租户规划证书及异常(公共)-D3执行私有化部署可用分析(公共)-开通钥匙ID不能为空", false);
                Assert.isNull(implementPrivatizationArrangeEmpowerAvailableComReqDto.getAuthType(), "D3判断通用租户规划证书及异常(公共)-D3执行私有化部署可用分析(公共)-授权类型不能为空", false);
                Assert.isNull(implementPrivatizationArrangeEmpowerAvailableComReqDto.getResultAspObjType(), "D3判断通用租户规划证书及异常(公共)-D3执行私有化部署可用分析(公共)-开通对象类型编码不能为空", false);
                Assert.isNull(implementPrivatizationArrangeEmpowerAvailableComReqDto.getAscriptionSpaceId(), "D3判断通用租户规划证书及异常(公共)-D3执行私有化部署可用分析(公共)-归属空间ID不能为空", false);
                implementPrivatizationArrangeEmpowerAvailableComRespDto = implementPrivatizationArrangeEmpowerAvailableCom(implementPrivatizationArrangeEmpowerAvailableComReqDto)/*vcase invoke 同服务,同domain*/;


            }
            JudgeArrangeEmpowerAvailableComRespDto judgeArrangeEmpowerAvailableComRespDto_2 = null;
            if (implementPrivatizationArrangeEmpowerAvailableComRespDto != null) {
                JudgeArrangeEmpowerAvailableComReqDto judgeArrangeEmpowerAvailableComReqDto_1 = new JudgeArrangeEmpowerAvailableComReqDto();
                if (implementPrivatizationArrangeEmpowerAvailableComRespDto != null) {
                    judgeArrangeEmpowerAvailableComReqDto_1.setAuthUseType(implementPrivatizationArrangeEmpowerAvailableComRespDto.getAuthUseType());//SimpleFieldAssign//sourceId:927472_1_41217
                }

                /*D2-3判断部署授权可用分析(公共)[6534]   */
                Assert.isNull(judgeArrangeEmpowerAvailableComReqDto_1.getAuthUseType(), "D3判断通用租户规划证书及异常(公共)-D2-3判断部署授权可用分析(公共)-授权使用类型不能为空", false);
                judgeArrangeEmpowerAvailableComRespDto_2 = fwCompSecurityClient.judgeArrangeEmpowerAvailableCom(judgeArrangeEmpowerAvailableComReqDto_1).getData()/*vcase invoke 跨dubbo调用;*/;


            }
//ModelCode: receptionService
            ImplementAcceptFieldRespDto receptionServiceRes_2 = null;
            if (judgeArrangeEmpowerAvailableComRespDto_2 != null) {
                ImplementAcceptFieldReqDto receptionServiceReq_1 = new ImplementAcceptFieldReqDto();
                if (judgeArrangeEmpowerAvailableComRespDto_2 != null) {
                    receptionServiceReq_1.setKeyOperateType(judgeArrangeEmpowerAvailableComRespDto_2.getKeyOperateType());//SimpleFieldAssign//sourceId:927392_1_41215
                    receptionServiceReq_1.setServiceAbnormalWords(judgeArrangeEmpowerAvailableComRespDto_2.getServiceAbnormalWords());//SimpleFieldAssign//sourceId:927393_1_41215
                }

                /*M3-接收钥匙可用类型及授权异常文案[6100]  用于特殊方法接收上游入参。 */
                Assert.isNull(receptionServiceReq_1.getKeyOperateType(), "D3判断通用租户规划证书及异常(公共)-M3-接收钥匙可用类型及授权异常文案-钥匙操作类型不能为空", false);
                receptionServiceRes_2 = nbSecurity.implementAcceptField(receptionServiceReq_1);


                receptionServiceRes_1 = receptionServiceRes_2;
            }
        }
        JudgeStandardDetermineTenantCertificateAvailabilityAbnormalComRespDto retData = new JudgeStandardDetermineTenantCertificateAvailabilityAbnormalComRespDto();
        if (receptionServiceRes_1 != null) {
            retData.setKeyOperateType(receptionServiceRes_1.getKeyOperateType());//SimpleFieldAssign//sourceId:927491_1
            retData.setServiceAbnormalWords(receptionServiceRes_1.getServiceAbnormalWords());//SimpleFieldAssign//sourceId:927492_1
        }


        return retData;
    }

    /**
     * D3获取授权对象实例数据(公共)[6943]
     * gen by moon at 7/16/2023, 11:38:52 PM
     */
    @Trace(operationName = "D3获取授权对象实例数据(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public ObtainImpowerObjectInstantiateDataComRespDto obtainImpowerObjectInstantiateDataCom(ObtainImpowerObjectInstantiateDataComReqDto reqDto) {


        ImplementAcceptFieldRespDto receptionServiceRes_3 = null;
        if ((reqDto != null && reqDto.getResultAspObjType() != null && reqDto.getResultAspObjType().equals("TENANT_SPACE"))) {
            //if(D3获取授权对象实例数据(公共).开通对象类型编码 等于 租户空间)  42831

//ModelCode: receptionService
            ImplementAcceptFieldRespDto receptionServiceRes = null;
            ImplementAcceptFieldReqDto receptionServiceReq = new ImplementAcceptFieldReqDto();
            receptionServiceReq.setComNumField(Long.valueOf(0));//CUSTOM_CONVENTION//sourceId:979638_1_42846

            /*M3约定数量为：0[6100]  用于特殊方法接收上游入参。 */
            Assert.isNull(receptionServiceReq.getComNumField(), "D3获取授权对象实例数据(公共)-M3约定数量为：0-通用数值字段（整数型）不能为空", false);
            receptionServiceRes = nbSecurity.implementAcceptField(receptionServiceReq);


//ModelCode: receptionService
            ImplementAcceptFieldRespDto receptionServiceRes_2 = null;
            ImplementAcceptFieldReqDto receptionServiceReq_1 = new ImplementAcceptFieldReqDto();
            if (receptionServiceRes != null) {
                receptionServiceReq_1.setComNumField(receptionServiceRes.getComNumField());//SimpleFieldAssign//sourceId:979636_1_42838
            }

            /*M3接收上文出参[6100]  用于特殊方法接收上游入参。 */
            Assert.isNull(receptionServiceReq_1.getComNumField(), "D3获取授权对象实例数据(公共)-M3接收上文出参-通用数值字段（整数型）不能为空", false);
            receptionServiceRes_2 = nbSecurity.implementAcceptField(receptionServiceReq_1);


            receptionServiceRes_3 = receptionServiceRes_2;
        } else if ((reqDto != null && reqDto.getResultAspObjType() != null && reqDto.getResultAspObjType().equals("EVA_THEME"))) {
            //elseif(D3获取授权对象实例数据(公共).开通对象类型编码 等于 评价主题)  42833

            List<OmsEvaluationTemplate> listOmsEvaluationTemplate = new ArrayList<>();
            QueryEvaTempListReq queryEvaTempListReq = new QueryEvaTempListReq();
            if (reqDto != null) {
                queryEvaTempListReq.setEvaluationSubjectId(reqDto.getResultAspObjId());//SimpleFieldAssign//sourceId:978654_1_42834
                queryEvaTempListReq.setSpaceId(reqDto.getAscriptionSpaceId());//SimpleFieldAssign//sourceId:978660_1_42834
            }

            /*3-2-02查评价模板列表[2191]   */
            Assert.isNull(queryEvaTempListReq.getEvaluationSubjectId(), "D3获取授权对象实例数据(公共)-3-2-02查评价模板列表-归属评价主题ID不能为空", false);
            Assert.isNull(queryEvaTempListReq.getSpaceId(), "D3获取授权对象实例数据(公共)-3-2-02查评价模板列表-创建于空间ID不能为空", false);
            listOmsEvaluationTemplate = mOmsEvaluationTemplateService.queryEvaTempList(queryEvaTempListReq)/*vcase invoke 本地 method 方法调用;*/;


            ImplementCountNumberDataSetsComRespDto implementCountNumberDataSetsComRespDto = null;
            ImplementCountNumberDataSetsComReqDto implementCountNumberDataSetsComReqDto = new ImplementCountNumberDataSetsComReqDto();
            if (listOmsEvaluationTemplate != null && !CollectionUtil.isEmpty(listOmsEvaluationTemplate) && listOmsEvaluationTemplate != null && !CollectionUtil.isEmpty(listOmsEvaluationTemplate)) {
                implementCountNumberDataSetsComReqDto.setCountNumberDataSetsList(//objList-to-objLists
                        listOmsEvaluationTemplate.stream().map(item -> {
                            CountNumberDataSetsDto elm = new CountNumberDataSetsDto();
                            elm.setCommPrimaryKey(item.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:208507_2_42844
                            return elm;
                        }).collect(Collectors.toList()));//objList-to-objLists//sourceId:979375_1_42844
            }

            /*D2-统计数据集条数[5166]   */

            implementCountNumberDataSetsComRespDto = interfaceModeService.implementCountNumberDataSetsCom(implementCountNumberDataSetsComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


//ModelCode: receptionService
            ImplementAcceptFieldRespDto receptionServiceRes_4 = null;
            if (implementCountNumberDataSetsComRespDto != null) {
                ImplementAcceptFieldReqDto receptionServiceReq_2 = new ImplementAcceptFieldReqDto();
                if (implementCountNumberDataSetsComRespDto != null) {
                    receptionServiceReq_2.setComNumField(implementCountNumberDataSetsComRespDto.getOutputNum());//SimpleFieldAssign//sourceId:979636_1_42845
                }

                /*M3接收上文出参[6100]  用于特殊方法接收上游入参。 */
                Assert.isNull(receptionServiceReq_2.getComNumField(), "D3获取授权对象实例数据(公共)-M3接收上文出参-通用数值字段（整数型）不能为空", false);
                receptionServiceRes_4 = nbSecurity.implementAcceptField(receptionServiceReq_2);


                receptionServiceRes_3 = receptionServiceRes_4;
            }
        } else if ((reqDto != null && reqDto.getResultAspObjType() != null && reqDto.getResultAspObjType().equals("EVA_TEMP"))) {
            //elseif(D3获取授权对象实例数据(公共).开通对象类型编码 等于 评价模板)  42840

//processBranchName:正常结束 ,processBranchId:42841

        }
        ObtainImpowerObjectInstantiateDataComRespDto retData = new ObtainImpowerObjectInstantiateDataComRespDto();
        if (receptionServiceRes_3 != null) {
            retData.setComNumField(receptionServiceRes_3.getComNumField());//SimpleFieldAssign//sourceId:979640_1
        }


        return retData;
    }
    //
}
